Introduction

This howto explains the technical integration of the rateit.cool service in your shopware installation version 4.x

These steps should you already done:

  1. . Buy the plugin in the Store
  2. . Register an account at rateit.cool
  3. . Verify your shop
  4. . Fill out the ean field in every productdata

You do not have to fill out the ean field, but if you don’t fill it, you can’t participate from the product reviews of all other shops that’s sells the same product.

Preparation

To show the product review stars Damit die Bewertungen in den Produktlisten richtig angezeigt werden müssen Sie in der Datei “engine/core/class/sArticles.php” in der Zeile 1046 folgendes Ergänzen

aDetails.ean,

Review forms

To add the review forms at the order history, you have to add / change the following things. All changes have to be done in the file “frontend/account/order_item.tpl”.

Shop Review Button

After the following HTML

<div class="grid_2">
<div class="textright"><strong> <a href="#order{$offerPosition.ordernumber}" title="{s name='OrderActionSlide'}{/s} {$offerPosition.ordernumber}" class="orderdetails button-middle small" rel="order{$offerPosition.ordernumber}"> {se name=”OrderActionSlide”}{/se} </a> </strong></div>
</div>

Add the following HTML

<div class="textright"><strong> <a href="#shopfeedbackform{$offerPosition.ordernumber}" title="{s name='shopFeedbackButtonTitle' namespace='frontend/plugins/rateit_cool_reviews/shop_feedback_form'}{/s}" class="orderdetails button-middle small" rel="shopfeedbackform{$offerPosition.ordernumber}"> {s name=”shopFeedbackButton” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s} </a> </strong></div>

The result HTML has to look like this

<div class="grid_2 nomargin-floatright">
<div class="textright"><strong> <a href="#order{$offerPosition.ordernumber}" title="{s name='OrderActionSlide'}{/s} {$offerPosition.ordernumber}" class="orderdetails button-middle small" rel="order{$offerPosition.ordernumber}"> {se name=”OrderActionSlide”}{/se} </a> </strong></div>
<p><!-- add from rateit cool --></p>
<div class="textright"><strong> <a href="#shopfeedbackform{$offerPosition.ordernumber}" title="{s name='shopFeedbackButtonTitle' namespace='frontend/plugins/rateit_cool_reviews/shop_feedback_form'}{/s}" class="orderdetails button-middle small" rel="shopfeedbackform{$offerPosition.ordernumber}"> {s name=”shopFeedbackButton” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s} </a> </strong></div>
<p><!-- add from rateit cool --></p>
</div>

At the end of the file, you have to add the following HTML. This is the shop review form.

<!-- add from rateit cool -->
<div id="shopfeedbackform{$offerPosition.ordernumber}" class="table_row rateit-cool-feedbackform" style="display: none;">
<div class="order--item panel--tr">
<h1>{s name=”shopFeedbackTitle” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s}</h1>
<form name="shopfeedbackform{$offerPosition.ordernumber}"><input type="hidden" name="gpntype" value="shop" /> <input type="hidden" name="gpnvalue" value="SHOPNAME" /> <input type="hidden" name="language" value="{s name=" languageforreviews="" namespace="frontend/plugins/rateit_cool_reviews/global" s="" /> <span class="reviewStars"> <input type="hidden" name="stars" value="0" /> <span class="star star0 value1" title="{s name=" onestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value2" title="{s name=" twostartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value3" title="{s name=" threestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value4" title="{s name=" fourstartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value5" title="{s name=" fivestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star-text"></span> </span></p>
<div class="feedback-title"><input type="text" style="padding: 10px 0 10px 5px; width: 99%;" name="feedbackTitle" placeholder="{s name=" shopfeedbacktitleplaceholder="" namespace="frontend/plugins/rateit_cool_reviews/shop_feedback_form" s="" /></div>
<div class="feedback-content"><textarea name="feedbackContent" style="width: 98%;" placeholder="{s name=" shopfeedbackcontentplaceholder="" namespace="frontend/plugins/rateit_cool_reviews/shop_feedback_form" s=""></textarea></div>
<div class="feedback-recommend"><input name="recommend" type="checkbox" /> {s name=”shopRecommendText” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s}</div>
<div class="rateit-cool-send-feedback"><a class="button-middle small" data-formname="shopfeedbackform{$offerPosition.ordernumber}">{s name=”shopSendFeedbackButton” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s}</a></div>
</form>
<div class="rateit-cool-send-feedback-success" style="display: none;">{s name=”shopSendFeedbackSuccessText” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s}</div>
<div class="rateit-cool-send-feedback-error" style="display: none;">{s name=”shopSendFeedbackErrorText” namespace=”frontend/plugins/rateit_cool_reviews/shop_feedback_form”}{/s}</div>
</div>
</div>
<!-- add from rateit cool -->

Product Review Button

Add the following HTML to price tag. This HTML is the open link for the product review form for each product.

{if $article.articleID > 0}
 <a href="#feedbackform{$offerPosition.ordernumber}_{$article.ordernumber}" rel="feedbackform{$offerPosition.ordernumber}_{$article.ordernumber}" class="orderdetails button-middle small" title="{s name='productFeedbackButtonTitle' namespace='frontend/plugins/rateit_cool_reviews/product_feedback_form'}{/s}">
   {s name="productFeedbackButton" namespace="frontend/plugins/rateit_cool_reviews/product_feedback_form"}{/s}
 </a>
{/if}

At the end of the “{/foreach}” direct beofre the “{foreach from=$offerPosition.details item=article}” add the following HTML:

<!-- add from rateit cool -->
{if $article.articleID > 0}
<div id="feedbackform{$offerPosition.ordernumber}_{$article.ordernumber}" class="table_row panel--table rateit-cool-feedbackform" style="display: none;">
<div class="panel--tr">
<h1>{s name=”productFeedbackTitle” namespace=”frontend/plugins/rateit_cool_reviews/product_feedback_form”}{/s}</h1>
<form name="feedbackform{$offerPosition.ordernumber}_{$article.ordernumber}">{if $article.ean} <input type="hidden" name="gpntype" value="ean" /> <input type="hidden" name="gpnvalue" value="{$article.ean}" /> {else} <input type="hidden" name="gpntype" value="{$rateItCoolUsername}" /> <input type="hidden" name="gpnvalue" value="{$article.ordernumber}" /> {/if} <input type="hidden" name="language" value="{s name=" languageforreviews="" namespace="frontend/plugins/rateit_cool_reviews/global" s="" /> <span class="reviewStars"> <input type="hidden" name="stars" value="0" /> <span class="star star0 value1" title="{s name=" onestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value2" title="{s name=" twostartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value3" title="{s name=" threestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value4" title="{s name=" fourstartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star star0 value5" title="{s name=" fivestartitle="" namespace="frontend/plugins/rateit_cool_reviews/global" s=""></span> <span class="star-text"></span> </span></p>
<div class="feedback-title"><input type="text" style="padding: 10px 0 10px 5px; width: 99%;" name="feedbackTitle" placeholder="{s name=" productfeedbacktitleplaceholder="" namespace="frontend/plugins/rateit_cool_reviews/product_feedback_form" s="" /></div>
<div class="feedback-content"><textarea name="feedbackContent" style="width: 98%;" placeholder="{s name=" productfeedbackcontentplaceholder="" namespace="frontend/plugins/rateit_cool_reviews/product_feedback_form" s=""></textarea></div>
<div class="feedback-recommend"><input name="recommend" type="checkbox" /> {s name=”productRecommendText” namespace=”frontend/plugins/rateit_cool_reviews/product_feedback_form”}{/s}</div>
<div class="rateit-cool-send-feedback"><a href="#" data-formname="feedbackform{$offerPosition.ordernumber}_{$article.ordernumber}" class="button-middle small rateit-cool-send-produkt-feedback">{s name=”productSendFeedbackButton” namespace=”frontend/plugins/rateit_cool_reviews/product_feedback_form”}{/s}</a></div>
</form>
<div class="rateit-cool-send-feedback-success" style="display: none;">{s name=”productSendFeedbackSuccessText” namespace=”frontend/plugins/rateit_cool_reviews/product_feedback_form”}{/s}</div>
<div class="rateit-cool-send-feedback-error" style="display: none;">{s name=”productSendFeedbackErrorText” namespace=”frontend/plugins/rateit_cool_reviews/product_feedback_form”}{/s}</div>
</div>
</div>
{/if} <!-- add from rateit cool -->

Stars at any product name

If you want to add the stars to all products in the order history, you have to add the following HTML to the “product-name”:

{if $article.articleID > 0}
 {if $article.ean}
<div class="rate-it-cool-product order-item-details" data-gpntype="ean" data-gpnvalue="{$article.ean}"></div>
 {else}
<div class="rate-it-cool-product order-item-details" data-gpntype="{$rateItCoolUsername}" data-gpnvalue="{$article.ordernumber}"></div>
 {/if}
{/if}

Contact

Send us a message with questions and feedback. We will contact you immediately.