Developer forum

Forum » Integration » Deactivate missing products

Deactivate missing products

Yung Yi Wong
Reply

I have an import proces and only those products in the import needs to be active.

In Data integration I saw that there is an option deactive missing products that are not listed. However when I use this and run the full import and then remove all products except one and run import again. Only half of all products are deactivated.


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Yung,
To help you it is needed to get some more info.
What are your source and destination providers? What Dynamicweb version are you using? If it is Dynamicweb9 what providers package versions are you using?
Regards, Dmitrij

 
Yung Yi Wong
Reply

I'm using core 8.8.0.14.

Source provider is a custom ftp provider that reads the file.

Destination provider is also custom.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Yung,
if you are using your custom providers then you need to debug the destination provider and find the problem in your code.

In Dynamicweb Ecom/Dynamicweb destination providers there is this kind of functionality so you can try to use them instead.
Those providers use the sql statement like:
update EcomProducts set ProductActive=0 where not exists  (select * from EcomProductsTempTableForBulkImport where
EcomProducts.ProductID = ProductID and EcomProducts.ProductVariantID = ProductVariantID EcomProducts.ProductLanguageID = ProductLanguageID)
so you can try to use similar approach
Regards, Dmitrij

Votes for this answer: 1
 
Yung Yi Wong
Reply

Hi Dmitriy,

I dont see any SQL queries in code.

It uses Mapping and schema mechanism.

 

I tried to do manual Product.GetAllProducts() and change active status to false and then save, but it goes so slow.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Yung,
if you are using your own destination provider I also can not see your code, I was just writting an approach you can try to use in your code.
Regards, Dmitrij

 

You must be logged in to post in the forum