Jump to content

Price deviation product page


Recommended Posts

Hello all,
 
I'm working on a webshop with prestashop version: 1.6.1.5, but i have a problem on the product page: http://leerverf.pixodemo.nl/nl/leerverf/46-brush-lederverf.html
 
The 1000ml price is good €50.00
The 500ml price is NOT good: €28.24 this must be: €28.25
The 210ml price is NOT good: €14,66 this must be: €14.65
 
For the 500ml and 210ml there is a 00,01 difference.
 
The price is calculated in a combination and decreases, here is an example image of the 500ml price calculation: http://leerverf.pixodemo.nl/prijs-eng.jpg
 
The weird thing is that when i add the 500ml to the cart, it is showing the right price. So on the product page it's showing wrong but in the cart it's the right price.
 
I think this is the code for showing the price on the product page: 
<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>
			{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}" />
			{hook h="displayProductPriceBlock" product=$product type="price"}
		{/if}
	{/strip}
</p>

Thanks for your help,

 

Regards Koen

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

  • 2 years later...

I had the same kind of issue. I solved it like this:

Go to controllers/front/ ProductController.php

Change this:

$combinations[$row['id_product_attribute']]['price'] = (float)($row['price'], null, Context::getContext()->currency, false);

To this:

$combinations[$row['id_product_attribute']]['price'] = (float)$row['price'];

 

This fixed my problem anyways. Hope it helps!

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