cancel
Showing results for 
Search instead for 
Did you mean: 

apply discount if X number of DIFFERENT sku's in cart share same attribute

apply discount if X number of DIFFERENT sku's in cart share same attribute

how do i apply discount ONLY if at least X amount of DIFFERENT sku's in cart share same attribute in magento ? for example, if i have 3 different products in the cart (different sku) with a custom "material" attribute set to "aluminium" then will apply discount, BUT if there is only one product sku with a "material" attribute set to "aluminium" in the cart, and the quantity of that product is set to 3, in that case discount will not apply since there are not 3 different sku with a "material" attribute set to "aluminium", each sku needs to be counted only once for the discount to apply, BUT after the discount is applied - each item in the cart should be counted regardless of sku. for example, if there are 3 different sku's with this attribute and discount is applied, and one of those 3 has a quantity of 2, then there wil be a discount for those 2 items of the same sku as well. i hope that makes sense.. thanksSmiley Happy magento 1.9

1 REPLY 1

Re: apply discount if X number of DIFFERENT sku's in cart share same attribute

This can be done through the standard Magento promotion rules.

Go to Promotions->Shopping Cart Price Rules.
Try to create new rule and Fill the relevant information for your rule in the first tab.

In the conditions tab click on the green plus by following the below structure:

If ALL of these conditions are TRUE :

If an item is FOUND in the cart with ALL of these conditions true:
SKU equals or greater than 2
Attribute " Shoe type " is assigned


Now under actions tab fill the relevant information and save.
Then go to frontend and add 2 different products having the attribute "Shoe Type" assigned.
Apply your coupon code and it should work.
It worked for me.