Search the Community
Showing results for tags 'margin'.
Hello, I am trying to find a discount module based on the real margin and the total order amount. I have installed margin report, I have also quantity price breaking but I would like to make or find a contribution that : - calculate the total margin of the customer basket (OK thanks to margin report) - and then with the order total adjust a discount amount in order to be sure to ever have a minimum margin For example the customer has choosen more than 1 product Case 1 : let say for example margin = 250€ and order total amount = 500 € + VAT 19% = 595€ I want to give a discount to the customer that let me have 30% margin on the total amount for Order total < 1000€ The addon must verify Order_total < 1000 € then ==> Calculate :Discount amount = Margin - (30% * Order_total) for this sample : = 250€ - (30%*595) = 71.50€ and perhaps round this amount to 70€ in order the customer can not calculate what happens behind. I would like to define the minimum margin I want for each values of order_total if order total <1000€ mimimum margin = 30% if order total <2000€ minimum margin = 25% If ...................<........minimum margin = x% and so on I have found so much discount addons but not this kind. I would like some help in order to make this contribution. Thanks!