Jump to content

Price product page more than 2 decimals occasionally, how to change to 2 decimals?


Recommended Posts

We use Prestashop 1.6 for some time now and we noticed some errors in Google merchant, especially with products that have discounts.

How can we change product.tpl so it always shows a price with 2 decimals. Google merchant misreads prices with more that 2 digits.

Examples:

<span id="our_price_display" class="price" itemprop="price" content="4.2075">€ 4,21</span> incl. BTW<meta itemprop="priceCurrency" content="EUR" /></p><p id="reduction_percent" ><span id="reduction_percent_display">-15%</span></p><p id="reduction_amount" style="display:none"><span id="reduction_amount_display"></span></p><p id="old_price"><span id="old_price_display"><span class="price">€ 4,95</span>

<span id="our_price_display" class="price" itemprop="price" content="2.4">€ 2,40</span> incl. BTW<meta itemprop="priceCurrency" content="EUR" /></p><p id="reduction_percent" style="display:none;"><span id="reduction_percent_display"></span></p><p id="reduction_amount" style="display:none"><span id="reduction_amount_display"></span></p><p id="old_price" class="hidden"><span id="old_price_display"><span class="price"></span>

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...