Jump to content

invalid floating point number in property "price" (in "offers")


optionsmegastore

Recommended Posts

hello all, as i know, that google changed some guidelines today and turned to have this critical issue that i m not being able to figure out how to fix.

i am using prestashop 1.6.0 and i m afraid this will affect my rating on google.

anyone have any clue how to fix that? i would really really appreciate it, thank you in advance 

please find attached the error. and whats exactly causing it.

thank you

prestashop 2.jpg

prestashop 1.jpg

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 3 months later...

Hi!

You need to change 2 files of your theme (product.tpl and product-list.tpl)

 

In product-list.tpl look for this piece of code (In my case it was on line 74):

<span itemprop="price" class="price product-price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

and change it to this:

<span class="price product-price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
<meta itemprop="price" content="{$product.price}" />
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

 


In product.tpl look for this piece of code (in my case it was on line 251):

<span id="our_price_display" class="price" itemprop="price">{convertPrice price=$productPrice}</span>
{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
{if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if}
{/if}
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

and change it to this:

<span id="our_price_display" class="price">{convertPrice price=$productPrice}</span>
{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
{if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if}
{/if}
<meta itemprop="price" content="{$productPrice}" />
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

PS: I use version 1.6.1.4 of Prestashop

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 5 months later...
On 8/26/2023 at 5:49 PM, ricardomyra said:

Hi!

You need to change 2 files of your theme (product.tpl and product-list.tpl)

 

In product-list.tpl look for this piece of code (In my case it was on line 74):

<span itemprop="price" class="price product-price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

and change it to this:

<span class="price product-price">
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
</span>
<meta itemprop="price" content="{$product.price}" />
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

 


In product.tpl look for this piece of code (in my case it was on line 251):

<span id="our_price_display" class="price" itemprop="price">{convertPrice price=$productPrice}</span>
{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
{if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if}
{/if}
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

and change it to this:

<span id="our_price_display" class="price">{convertPrice price=$productPrice}</span>
{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
{if $priceDisplay == 1} {l s='tax excl.'}{else} {l s='tax incl.'}{/if}
{/if}
<meta itemprop="price" content="{$productPrice}" />
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

PS: I use version 1.6.1.4 of Prestashop

Hello,

I'm using 1.7.8.11 and as a newbie I found several product.tpl files in different folders even in a theme in use. in which folders these should be?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...