Skip to content

Conversation

zerrac
Copy link

@zerrac zerrac commented Nov 21, 2024

Description

When using condition "not one of" on multiple categories, products are matched when absent of just one of the categories.

pre-fix where condition :

" ((NOT FIND_IN_SET('5',`ccp`.`category_id`) OR NOT FIND_IN_SET('55',`ccp`.`category_id`) OR NOT FIND_IN_SET('80',`ccp`.`category_id`) OR NOT FIND_IN_SET('148',`ccp`.`category_id`))) "

post-fix where condition :

" ((NOT FIND_IN_SET('5',`ccp`.`category_id`) AND NOT FIND_IN_SET('55',`ccp`.`category_id`) AND NOT FIND_IN_SET('80',`ccp`.`category_id`) AND NOT FIND_IN_SET('148',`ccp`.`category_id`))) "

# Step to reproduce

  • Try to apply a promotion on all products but those in two categories
  • Products in the two categories are excluded
  • Products in only one category are not

@github-actions github-actions bot added the Component: Rule Relates to Mage_Rule label Nov 21, 2024
@kiatng
Copy link
Contributor

kiatng commented Nov 28, 2024

I tried to replicate with sample data in DDEV.
I discount $1 on all products except 2 categories: Electronics and VIP. In frontend, the rule is applied correctly.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants