Ramio Posted February 28, 2015 Share Posted February 28, 2015 Hi...I need to customize my presta... i'm using prestashop 1.6.0.9.My customer asked me to enable multiple Discount on an orderFor exampleMy user "A" have got 3 discount rule: 50% 10% and 10% on total orderMy user "A" add to cart some product for a total of 100$With his 3 discount rule him have to pay only 40,5$ (100$ -50% = 50$ - 10% = 45 - 10% = 40,5$) If I set 3 discount rule normally my prestashop wrong calculation is: (100$ - 50$ -10$ -10$ = 30$)How can i do this?Thanks in advance Ramio Link to comment Share on other sites More sharing options...
Ramio Posted March 3, 2015 Author Share Posted March 3, 2015 I've found where order discount is calculatedOn cart.php (lines 1525-1551) and on cart_rule.php (line 841-850)For every rule, prestashop calculate % reduction on total order price reading this value from $order_total = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS, $package_products); Now i think i need to decrease this value everytime a % reduction is calculatedSomeone can help me?ThanksRamio 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