Creating catalog rule to exclude specific products from coupon code based on value of custom field

Michael Ollinger asked on August 14, 2017 22:23

I want to create a catalog rule that will exclude products based on the boolean value of a custom field (Closeouts, in this scenario); however, I'm not clear on what to enter for the condition. Any direction would be appreciated!

Recent Answers


Trevor Fayas answered on August 15, 2017 19:41 (last edited on August 15, 2017 19:41)

It would be under the "Applies to" field in the Catalog Discount, this is a Macro rule editor, and here you can either try to use existing rules / macros, or create your own to do a check.

In your specific case, you can probably just do:

SKU.GetValue("Closeouts", false) == true

Note this assumes the value is on the SKU, not the Page Type, if the booleon is on the Page Type you may need to do something like:

Documents.WithAllData.ClassNames("custom.myclass").Where("NodeSKUID = "+SKU.SKUID).FirstItem.GetValue("Closeouts", false) == true

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.