Using discount codes but exclude certain products

Hi there!

I am having trouble with discount codes where certain items are excluded from the discount.

The data types in use for this are:

Discount Codes which includes a field for a list of Excluded Products
Products
Cart Items

We want to try to apply a discount code, but it needs to

a) exist
b) not exclude the current user
c) not exclude any items that are in the Current User’s Cart Items (which are in a repeating group also)

Here’s our current set-up where we’re getting a red error.

Hi there, @emma1… if I understand your post correctly, I think you need to use an advanced filter for the last constraint. So, remove the red constraint, and change your search expression to Search for Discount Codes:filtered:count > 0. Then, add a constraint to the filter, and select the Advanced option at the bottom of the dropdown. Finally, set up an expression for the constraint that should be something like This Discount Code's Products Excluded intersect with Repeating Group Cart Item's List of Cart Items:count is 0.

Hope this helps.

Best…
Mike

This topic was automatically closed after 70 days. New replies are no longer allowed.