Developer forum

Forum » Integration » Deactivation of products based on shopid

Deactivation of products based on shopid

Anders Ebdrup
Anders Ebdrup
Reply

Hello,

 

We are trying to figure out how to only deactivate products from a specific shop, and the special thing here is, that the products is not in a group, but only have a DefaultShopId.

Any idea of how that can be achieved?

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Using PIM you can probably do it using a query and multi edit.

In catalog, I think it is impossible.

Or you can go to SQL Firehose and do an UPDATE EcomProducts SET...

BR Nicolai

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Nicolai,

 

I need this when importing products into Dynamicweb where I have multiple shops and products and are not placed in a group, but just attached to a shop with the ProductDefaultShopId.

Can that be done?

 

Best regards, Anders

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Anders,
you can try the existing option "Deactivate missing products" option and set the ProductDefaultShopId as a Primary key column in the data integration job table mappings,
but this is only for the missing products deactivation and if you have the ProductDefaultShopId values in the source.

If that doesn't suit then it is needed to implement some code: create the TableScript class where you can cache products you are importing and then in the JobFinished notificaiton subscriber
execute the sql statement to update products you need.
Regards, Dmitrij

 

You must be logged in to post in the forum