idee Posted August 17, 2022 Share Posted August 17, 2022 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 More sharing options...
Ali Samie Posted August 17, 2022 Share Posted August 17, 2022 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 More sharing options...
idee Posted August 17, 2022 Author Share Posted August 17, 2022 Yeah, seems you are right. Trying to find now where that data gets loaded from after the ajax call... Thanks for the hint Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now