cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to override CatalogVersionSync Job to sync products from the master catalog to appropriate product catalogs based on product attribute?

Former Member
View Entire Topic
former_member686625
Participant
0 Likes

Hi Vinay,

You can achieve this by creating 2 syncjob with different target catalog and different restriction on each of them based on your attribute value.

So for masterCatalog:Staged->childCatalogA:Online, you need to put restriction something like: {pk} in ({{Select {p:pk} from {Product as p} where {p:childCatalog} = 'A'}})

and for syncJob masterCatalog:Staged->childCatalogB:Online something like: {pk} in ({{Select {p:pk} from {Product as p} where {p:childCatalog} = 'B'}})

To apply this restriction, you need to: 1. open sync job and go to "advanced Attriutes" tab. 2. Go to "Session Attribute" section and create a new user. 3. Open user and go to tab "personalization". 4. Create a Personalization rule and give the above mentioned query. Select "Restricted Type" as Product and "apply on" - the user you just created for this job. 5. Save it and run the job.

I hope this will help.

Former Member
0 Likes

Hi @Manish,

Thanks for your answer. But this restriction will not work for admin users. Also this will not work for single product sync from product cockpit.

former_member686625
Participant
0 Likes

Hi Manas,

Even if you run the job with admin, restriction will apply as we have explicitly assigned user in session(as I mentioned above) and we are applying restriction on it.

"this will not work for single product sync from product cockpit." - Yes it won't in this case.

Regards.