u2nr Posted April 23, 2014 Share Posted April 23, 2014 Hi there, I have a catalog price rule that discounts all products with 50% in a certan category. This works fine. When the cutomer adds the products to the cart it displays the percentage as 46.01%. (See picture prestashopPriceWrong.jpg) So i went to the template file (i use standard 1.6 template) and modified /themes/default-bootstrap/shopping-cart-product-line.tpl - this worked fine (check picture prestashopPriceOk.jpg now the problem is every time i press the +/- to increase or decreas the quntity the cart refreshes and switches back to view that is not correct. When i do a full page refresh the view is correct again. I think this is a ajax call that loads something - but i can not inde what... Thanx for your help! Lars Link to comment Share on other sites More sharing options...
radioheadpeter Posted April 23, 2014 Share Posted April 23, 2014 I have the same problem. In some products respects me and others change the percentage Link to comment Share on other sites More sharing options...
u2nr Posted April 23, 2014 Author Share Posted April 23, 2014 (edited) Hi Peter, I found a way how it worked for me: The magic of the ajax call happens in this file -> /themes/default-bootstrap/js/cart-summary.js I had to change line 751 Original: priceReductionPercent = ps_round((ps_round(product_list[i].price_without_quantity_discount) - ps_round(product_list[i].price_wt))/ps_round(product_list[i].price_without_quantity_discount) * -100); I changed it to: priceReductionPercent = Math.round((product_list[i].price/product_list[i].price_without_quantity_discount)*-100); Hope this helps! Cheers, Lars Edited April 23, 2014 by u2nr (see edit history) Link to comment Share on other sites More sharing options...
radioheadpeter Posted April 30, 2014 Share Posted April 30, 2014 no, it did not work to me Ayway, thank you very much 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