I currently have requirements to create following Magento promo using code. I have taken care of coding part, however unable to calculate the discount.
Rule 3 For 4.00
Condition: When customers adds any 3 of any given Sku, apply the rule There is no limit on rule. So if customer adds 6 of 9401704, then discount should apply 2 times and so on.
Fixed Discount:4
sku: 9401704 price: 4, sku: 4299345 price: 1.75, sku: 3456775 price: 3
As far as my understanding goes, there is no default rule which meet this requirements. Tier pricing only covers same product,There is extension from webshopapps but this only works if all products are of same price. http://www.webshopapps.com/eu/tiered-pricing-across-multiple-products.html
So I created custom rule action and calling my own discount logic in observer when rule event fires.
I am unable to calculate the discount and adjust the subtotal based on promo.I am ending up with either extra or less value in discount.
This seems common rule to me. Someone with with this promo, plz share your experience?