Jump to content

Change Yotpo place in the product description block


Recommended Posts

I have the the Yotpo module installed in my shop, and it just appear in the product page, but I have tried put it under the product description block but it don't change its position when I change it in the hook, how to change the Yotpo place?

Link to comment
Share on other sites

This depends on your theme, and there the product footer hook is located in the theme itself. If you want the reviews block to appear in the product's footer area, you have to change the default theme and take this

 

{if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if}

 

to the very bottom of footer.tpl, before closing the last {/if}.

 

Then, in yotpo, copy the content of hookDisplayProductTabContent to a new method called hookDisplayProductFooter :) And transplant it, of course

Link to comment
Share on other sites

I solved it like Yotpo told to do, I open the module configuration, and in "Select widget location" I choose "other (click update to see instructions)", so I openned the product.tpl and I had paste the code there:
 

	{if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if}
	</div>
</div>
{/if}

<div class="yotpo reviews" 
data-appkey="{$yotpoAppkey|escape:'htmlall':'UTF-8'}"
data-domain="{$yotpoDomain|escape:'htmlall':'UTF-8'}"
data-product-id="{$yotpoProductId|intval}"
data-product-models="{$yotpoProductModel|escape:'htmlall':'UTF-8'}"
data-name="{$yotpoProductName|escape:'htmlall':'UTF-8'}" 
data-url="{$link->getProductLink($smarty.get.id_product, $smarty.get.id_product.link_rewrite)|escape:'htmlall':'UTF-8'}" 
data-image-url="{$yotpoProductImageUrl|escape:'htmlall':'UTF-8'}" 
data-description="{$yotpoProductDescription|escape:'htmlall':'UTF-8'}" 
data-bread-crumbs="{$yotpoProductBreadCrumbs|escape:'htmlall':'UTF-8'}"
data-lang="{$yotpoLanguage|escape:'htmlall':'UTF-8'}"> 
{$richSnippetsCode|escape:'UTF-8'} 
</div>

{if isset($packItems) && $packItems|@count > 0}
	<div id="blockpack">
		<h2>{l s='Pack content'}</h2>
		{include file="$tpl_dir./product-list.tpl" products=$packItems}
	</div>
{/if}

{/if}

 
Now it is under my description block!

Link to comment
Share on other sites

I have the the Yotpo module installed in my shop, and it just appear in the product page, but I have tried put it under the product description block but it don't change its position when I change it in the hook, how to change the Yotpo place?

 

We support installing it in the footer or in a tab.
If you want it in a custom place you have to choose "other" in the configuration of the widget in the Prestashop admin
and then do this:

 

In order to locate the widget in a custom position, please open the "root" folder, then enter the "themes" library. Locate the specific theme you would like the widget to show up on, and in this specific themes folder, locate the file "product.tpl". Add the code here, wherever you would like it placed.

 
<div class="yotpo reviews" 

data-appkey="{$yotpoAppkey|escape:'htmlall':'UTF-8'}"

data-domain="{$yotpoDomain|escape:'htmlall':'UTF-8'}"

data-product-id="{$yotpoProductId|intval}"

data-product-models="{$yotpoProductModel|escape:'htmlall':'UTF-8'}"

data-name="{$yotpoProductName|escape:'htmlall':'UTF-8'}" 

data-url="{$link->getProductLink($smarty.get.id_product, $smarty.get.id_product.link_rewrite)|escape:'htmlall':'UTF-8'}" 

data-image-url="{$yotpoProductImageUrl|escape:'htmlall':'UTF-8'}" data-description="{$yotpoProductDescription|escape:'htmlall':'UTF-8'}" 

data-bread-crumbs="{$yotpoProductBreadCrumbs|escape:'htmlall':'UTF-8'}"

data-lang="{$yotpoLanguage|escape:'htmlall':'UTF-8'}"> 

{$richSnippetsCode|escape:'UTF-8'} 

</div>

Link to comment
Share on other sites

This depends on your theme, and there the product footer hook is located in the theme itself. If you want the reviews block to appear in the product's footer area, you have to change the default theme and take this

 

{if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if}

 

to the very bottom of footer.tpl, before closing the last {/if}.

 

Then, in yotpo, copy the content of hookDisplayProductTabContent to a new method called hookDisplayProductFooter :) And transplant it, of course

 

Thanks for helping out Nemo1.

 

 

I solved it like Yotpo told to do, I open the module configuration, and in "Select widget location" I choose "other (click update to see instructions)", so I openned the product.tpl and I had paste the code there:

 

	{if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if}
	</div>
</div>
{/if}

<div class="yotpo reviews" 
data-appkey="{$yotpoAppkey|escape:'htmlall':'UTF-8'}"
data-domain="{$yotpoDomain|escape:'htmlall':'UTF-8'}"
data-product-id="{$yotpoProductId|intval}"
data-product-models="{$yotpoProductModel|escape:'htmlall':'UTF-8'}"
data-name="{$yotpoProductName|escape:'htmlall':'UTF-8'}" 
data-url="{$link->getProductLink($smarty.get.id_product, $smarty.get.id_product.link_rewrite)|escape:'htmlall':'UTF-8'}" 
data-image-url="{$yotpoProductImageUrl|escape:'htmlall':'UTF-8'}" 
data-description="{$yotpoProductDescription|escape:'htmlall':'UTF-8'}" 
data-bread-crumbs="{$yotpoProductBreadCrumbs|escape:'htmlall':'UTF-8'}"
data-lang="{$yotpoLanguage|escape:'htmlall':'UTF-8'}"> 
{$richSnippetsCode|escape:'UTF-8'} 
</div>

{if isset($packItems) && $packItems|@count > 0}
	<div id="blockpack">
		<h2>{l s='Pack content'}</h2>
		{include file="$tpl_dir./product-list.tpl" products=$packItems}
	</div>
{/if}

{/if}

 

Now it is under my description block!

 

Happy to see that you worked it out. I didn't refresh the page before posting my previous answer:) All the best and if you have any other questions then feel free to let me know.

Link to comment
Share on other sites

  • 2 months later...

Hello

 

1)how do i put yotpo stars under of product name ? like at below

 

http://screencast.com/t/0lKMTfVQA

 

 

2)also i added your codes for product-list.tpl but grids are sorted wrong.

 

http://www.screencast.com/t/n803Vddex

 

 

3)The send button isnt working in emails for submit the reviews.

 

 

 

 

Regards

Ps3z

Edited by ps3z (see edit history)
Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...