And63 Posted September 14, 2013 Share Posted September 14, 2013 (edited) We have in Prestashop weight as possible in terms of promotions, discounts for groups of customers for a given product category. My question relates to a method of calculating the final price - where is it made? Namely, we have the product for retail 1000€ D, but our regular customers we give him 10% (discount for group in category) off R - Price displayed about -900 €. We're doing great promotion and lowering prices for the week for only one product of 200 € (special price) S K now the final price is calculated according to the formula: K = (D-(D * R)) - (S-(S * R)) is: K = (1000 - (1000 * 10%) - (200 - (200 * 10%)) K = 900 - 180 K = 720€ But I want to make the price of this product was on special offer K = D-S K = 1000€ - 200€ K = 800€ An example of the output price € 1000 http://ar.az.pl/flashitall/unique-flash-drives/7-ecouteurs-a-isolation-sonore-shure-se210-blanc.html prestashop 1.5.4.1 Sorry for my english Edited September 16, 2013 by And63 (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted September 16, 2013 Share Posted September 16, 2013 Isn't it not easier to just discount not an extra 200, but just 111.11? 1000 - (1000 x10%) - (111.11 - (111.11 x 10%) = 1000 - (100) - (111.11 - (11.111) = 900 - 99.999 = 800.001 = 800 My 2 cents, pascal Link to comment Share on other sites More sharing options...
And63 Posted September 16, 2013 Author Share Posted September 16, 2013 Hi Pascal. I'm in my store 10 groups of customers with various discounts categories. Counting every week that I have set the price for which the group would be too cumbersome. So I modified the core system already for their needs and hopes as I want to. Since the problem solved - Mark Topic as resolved Link to comment Share on other sites More sharing options...
PascalVG Posted September 16, 2013 Share Posted September 16, 2013 Hi And, just for completeness sake, can you share the solution you made? Which file(s)/function(s) you changed etc? This way others with similar questions can use this as a good start :-) Thx! Happy selling, pascal. Link to comment Share on other sites More sharing options...
And63 Posted September 19, 2013 Author Share Posted September 19, 2013 Hi Pascal. The solution that I used is not universal. Assumptions were the: The store does not and will not be used as a special price reduction % Discounts for groups of clients assigned to a category of products do not affect the special price. Price added in the BO as a special price is displayed as the reduction in price, so far is an added reduction. Price of the product added in this way is valid in store for client groups which has been allocated. The reduction applies only to the specific product. Each product can be assigned a different price special. Discounts for groups of clients assigned to a category of products do not affect the special price. Solution: In file /classes/Product.php: change code from: if ($use_group_reduction) { if ($reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group)) $price -= $price * $reduction_from_category; else // apply group reduction if there is no group reduction for this category $price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100); } to: if ($use_group_reduction) { if ($specific_price) $price = $specific_price['reduction']; else if ($reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group)) $price -= $price * $reduction_from_category; else // apply group reduction if there is no group reduction for this category $price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100); } That's it - goal achieved Link to comment Share on other sites More sharing options...
PascalVG Posted September 21, 2013 Share Posted September 21, 2013 Thanks for sharing! Link to comment Share on other sites More sharing options...
onlinerepa Posted September 30, 2013 Share Posted September 30, 2013 (edited) Final Retail Price does not calculate. I have for my pretax listed, tax amount selected but the Final Retail Price does not calculate. Are there any changes that I need to make in my setup? Thank youf or your assistance. Edited September 30, 2013 by onlinerepa (see edit history) Link to comment Share on other sites More sharing options...
And63 Posted February 7, 2014 Author Share Posted February 7, 2014 I modified some patch and now it is added correctly. conditions: If the product has a discount category is not applicable it at a special price: if ($use_group_reduction) { if ($specific_price) $price += $price * $reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group); else if ($reduction_from_category = (float)GroupReduction::getValueForProduct($id_product, $id_group)) $price -= $price * $reduction_from_category; else // apply group reduction if there is no group reduction for this category $price *= ((100 - Group::getReductionByIdGroup($id_group)) / 100); } 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