We would like to give a discount on a product in the cart, IF the customer has exceeded a specific quantity of that product in the cart. The complex part is, the specific quantity is custom per product - and set in a custom attribute.


  1. widget custom field for sale-threshold is 5 units

  2. If a customer has 4 widgets in cart, no discount is given

  3. If the customer has 5 or more in the cart, then they get a discount configured in the rule

(I tried using the code for the custom attribute in the rule itself "if quantity in cart equals or is greater than sale_threshold" - but that didn't work)

Is this possible?

1 Answer 1


It is possible to configure a custom attribute to be usable in cart price rules.

In BO you can do it in Catalog > Attributes > Manage Attributes > [find and select your custom attribute]. In the "Properties" menu, set "Use for Promo Rule Conditions" to "Yes"

You can also do it in a setup script :

/* @var $installer Mage_Catalog_Model_Resource_Setup */

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.