Jump to content

Display the unit prices in the shopping cart.


idee

Recommended Posts

 Prestashop 1.6.1

I would like to display the unit prices in the shopping cart. To do this, I added the following to the shopping-cart-product-line-tpl:

{if $product.unit_price_ratio >0 && $product.price}
        {math equation="b/a" a=$product.unit_price_ratio b=$product.price_without_reduction assign=realunit}
        {l s="("}{convertPrice price=$realunit} {l s="/"} {$product.unity}{l s=")"}
    {/if}

The unit prices are displayed with that snippet.
If you now change the number of items in the shopping cart, the display of the unit price disappears again, although the unit price remains the same.

Any idea how the unit price remains displayed?

Link to comment
Share on other sites

12 minutes ago, idee said:

If you now change the number of items in the shopping cart, the display of the unit price disappears again

I think thats because when you change some thing an ajax call will render this part of page again. So, you might need to change another template too. I am not sure where it is but I guess that is what you need to be looking for

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