Heinrich.M Posted September 27, 2017 Share Posted September 27, 2017 What can be the reason that in HTML of product.tpl there is a mismatch of schema org price and price shown to customers? <span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span> html: temtype="https://schema.org/Offer"><span id="our_price_display" class="price" itemprop="price" content="10.999999">11,00 €</span><meta itemprop="priceCurrency" content="EUR" That is a serious problem for our product advertisement via Google Shopping Link to comment Share on other sites More sharing options...
Heinrich.M Posted September 28, 2017 Author Share Posted September 28, 2017 This is code of my product.tpl: <!-- prices --> <div class=“price”> <p class=“our_price_display” itemprop=“offers” itemscope itemtype=“https://schema.org/Offer”>{strip} {if $product->quantity > 0}<link itemprop=“availability” href=“https://schema.org/InStock”/>{/if} {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id=“our_price_display” class=“price” itemprop=“price” content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span> <meta itemprop=“priceCurrency” content="{$currency->iso_code}" /> {/if} {/strip}</p> {hook h=“displayProductPriceBlock” product=$product type=“price”} {if $priceDisplay >= 0 && $priceDisplay <= 2} {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))} <span class=“tax-label”>{if $priceDisplay == 1} {l s=‘tax excl.’}{else} {l s=‘tax incl.’}{/if}</span> {/if} {/if} <p id=“old_price”{if (!$product->specificPrice || !$product->specificPrice.reduction)} class=“hidden”{/if}>{strip} {if $priceDisplay >= 0 && $priceDisplay <= 2} {hook h=“displayProductPriceBlock” product=$product type=“old_price”} <span id=“old_price_display”><span class=“price”>{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction|floatval}{/if}</span>{if $tax_enabled && $display_tax_label == 1} {if $priceDisplay == 1}{l s=‘tax excl.’}{else}{l s=‘tax incl.’}{/if}{/if}</span> {/if} {/strip}</p> {if $priceDisplay == 2} <br /> <span id=“pretaxe_price”>{strip} <span id=“pretaxe_price_display”>{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span> {l s=‘tax excl.’} {/strip}</span> {/if} </div> <!-- end prices --> As said Google Merchant Center list more ca. 200 products. 10% of them are blocked due to mismatch in price. This is the case since google believes in the prices in the feed it gets from us and that is ok. But it also believes in schema.org price markup of the html of the given products when it crawls them. If you look into those products at the html code you see that schema.org prices differ from 'standard' price!! this is serious . Link to comment Share on other sites More sharing options...
Heinrich.M Posted September 29, 2017 Author Share Posted September 29, 2017 (edited) I noticed that itemprop="price" is always 1 cent reduced of normal price when product is out of stock! But also some products are effected that are on stock. So, I assume this could be "only" database related? I would be so glad to get some help here. Or is it a calculation issue: itemprop="price" content="17.899999">17,90 € rounding? theme or Prestashop? Edited September 29, 2017 by Heinrich.M (see edit history) Link to comment Share on other sites More sharing options...
Heinrich.M Posted October 4, 2017 Author Share Posted October 4, 2017 content="{$productPrice} is the culprit of course. For the setting "round Tax" in BO this vaule needs rounding, breaking down to two decimals after "point" for Google Schema... Link to comment Share on other sites More sharing options...
godlo Posted September 21, 2024 Share Posted September 21, 2024 (edited) in my case I solved with {$productPrice|round:2} <span id="our_price_display" class="price" itemprop="price" content="{$productPrice|round:2}">{convertPrice price=$productPrice|floatval}</span> I tested my pages with google rich snippet tester and now are ok. https://search.google.com/test/rich-results Edited September 21, 2024 by godlo (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now