ezakimak Posted March 14, 2011 Share Posted March 14, 2011 Hi, I just upgraded from ps1.3.1 to ps1.3.6 ,I see there are a few extra columns in ps_order_details (specially these reduction_percent and reduction_group )I am trying to find where in the code (in BO AdminOrders) is calculating (and how) the final price, let me explainI have product A with price 11.000$ with a percent_discount of 15% and a customer who is buying it has a group reduction of 30%, in FO I managed to apply the biggest reduction , in this case 30%, so the final price is 7700$ , the order is saved with total = 7700 but the detail is saved with price 11000 and percent_reduction 15% and group_reduction 30%,so that when I see the order in BO the total of the order is shown correctly (7700$) but in the product detail shows a price of 6545$ ( which is 11000$*0.7(group_reduction)*0.15(percent_reduction)), so in BO is applying both reductions to get the final priceAnybody could give a hint about this, I couldnt find the code in BO which is doing thisthanksHugh Link to comment Share on other sites More sharing options...
ezakimak Posted March 14, 2011 Author Share Posted March 14, 2011 I think I found part of the "problem" I /classes/Order.php in method Order::getProducts() there is a call to another method Order::setPricess , which is recalculating the prices to show in BOThe other difference is in /classes/PaymentModule.php the method PaymentModule::validateOrder() is saving the product price without the reductions applied in FO , so I guess thats all I need to change to maintain my desired price calculation behavior 1 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