Jump to content

Edit History

helpdeskED

helpdeskED

I used a tricky way and I hope it will be accepted by Google. I just copied the following code from an earlier point in product-list.tpl and placed it after line 136 (prestashop 1.6)

Here is the code (start...) 

<span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}">
                    {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
  </span>

(...end of code)

What I really did is duplicate the already existing itemprop="price" and then I just placed it right after the line 135 (start of line... ) <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability"> (...end of line). This way I informed Google that besides avaliability, there is also a price, even if this price was already mentioned. This happens because, according to the Google point of view, there should be only one product in the page...

I verified my solution with Google >> google.com/structured-data/testing-tool . I hope I helped...this might be useful to all versions, since the idea is to add markup atrribute and not to change the core code of prestashop.

helpdeskED

helpdeskED

I used a tricky way and I hope it will be accepted by Google. I just copied the following code from an earlier point in product-list.tpl and placed it after line 136 (prestashop 1.6)

Here is the code (start...) 

<span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}">
                    {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
  </span>

(...end of code)

What I really did is duplicate the already existing itemprop="price" and then I just placed it right after the line 135 (start of line... ) <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability"> (...end of line). This way I informed Google that besides avaliability, there is also a price, even if this price was already mentioned. This happens because, according to the Google point of view, there should be only one product in the page...

I verified my solution with Google >> google.com/structured-data/testing-tool . I hope I helped...this might be useful to all versions, since the idea is to add markup atrribute and not to change the core code of prestashop.

helpdeskED

helpdeskED

I used a tricky way and I hope it will be accepted by Google. I just copied the following code from an earlier point in product-list.tpl and placed it after line 136 (prestashop 1.6)

Here is the code (start...) 

<span itemprop="price" class="price product-price{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} product-price-new{/if}">
                    {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
  </span>

(...end of code)

What I really did is duplicate the already existing itemprop="price" and then I just placed it right after the line 135 (start of line... ) <span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability"> (...end of line). This way I informed Google that besides avaliability, there is also a price, even if this price was already mentioned. This happens because, according to the Google point of view, there should be only one product in the page...

I verified my solution with Google >> https://search.google.com/structured-data/testing-too . I hope I helped...this might be useful to all versions, since the idea is to add markup atrribute and not to change the core code of prestashop.

×
×
  • Create New...