Jump to content

Unit price shown without discount on product-list.tpl

Recommended Posts



I'm showing the unit price on both my product pages and my product list. I have new added a new discount for one catagory, but for some reason the unit price on the product list is still shown without the discount. On the product page itself, the correct unit price (with discount) is shown.


Here's the code I use for the unit price:




{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> <!--{l s='per'}--> {$product->unity|escape:'htmlall':'UTF-8'}</p>




And on my product-list.tpl:


{if $product.unit_price_ratio}

<span class="availability">{math equation="b/a" a=$product.unit_price_ratio b=$product.price_without_reduction assign=realunit}

{convertPrice price=$realunit} {$product.unity}</span>



I've tried replacing the product-list.tpl code with the one from product.tpl, but that result in nothing shown at all.


Any idea how I get the product-list to include possible discounts?


I'm using Prestashop



Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More