cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch changes to category only when a product is assigned to it ?

PRAGSMATIC
Participant
0 Kudos

When a product is assigned to a category, I want to catch that change event and want to know which product is getting assigned to category ?

Similary if a super category is being assigned to a product, how to catch if what super category is being assigned ?

If a child category is being assigned to a super category, then how to catch that too ?

PRAGSMATIC
Participant
0 Kudos

Can interceptor be created for Relations ? I though it could only be created for Models ?

geffchang
Active Contributor
0 Kudos

anurag.gupta.home24 I deleted my answer. You're right. I think we can't create interceptors for relations.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

There are two ways to achieve that
1. Introduce Product and Category interceptor, check for corresponding Dirty attributes

2. If relation created directly create new AfterSaveListener to handle relation changes

Answers (0)