Developer forum

Forum » Integration » Dactivate missing products doesn't work

Dactivate missing products doesn't work

René Poulsen
Reply

Hi,

I'm currently working on a soltion with 3 different shops in 3 dirreferent languages. The products comes from NAV and almost all products exists in every shop. The product ID is the same and this should not be a problem because the primary key on the products is productid, languageid and variantid.

I can see that I have 3 records with the same product id in the EcomProducts, but with different language ID's, so it seems like this is working the way it's supposed to. I have one problem though. When our customer removes products from the NAV the products doesn't get deactivated even though I've checked 'Deactivate missing products' in the destination settings for the import job. (see attached screenshot).

I haven't got any clue why this isn't working. Am I missing some other checkbox setting? Is this not possible?

deactivate-missing-products.png

Replies

 
Dmitriy Benyuk
Reply

Hi René,
the option "Deactivate missing products" is taking into account the selected setting from the "Shop" drop-down, so if any shop is selected the only products which groups belong to this selected shop are deactivated. You can check your groups if they belong to the selected shop or don't select any "Shop" in the job settings(to remove the shop filtering).
Regards, Dmitrij

 
René Poulsen
Reply

Hi Dmitriy,

I'm not sure i understand what you mean. As you see, I've chosen "DK" shop in the shop dropdown.

In the DK shop i have a product with product ID "34-0200-000157" belonging to a group in the DK shop. The product no longer exists in the NAV, so when I run the import I believe that the product with that ID should be deactivated as it is missing in the XML I get from NAV.

I don't understand what you mean by "...so if any shop is selected the only products which groups belong to this selected shop are deactivated.". It's the group thing I don't understand. I just want to deactivate missing products.

 
Dmitriy Benyuk
Reply
This post has been marked as an answer

HI René,
let me explain more about "...so if any shop is selected the only products which groups belong to this selected shop are deactivated.".

In eCom you can attach the same product to different groups from different shops. So if your product belongs to several shops it will not be deactivated using this option.

Votes for this answer: 1
 
René Poulsen
Reply

Ok, now I understand. So even though there is 3 rows in the EcomProducts database - where each has it's own "Active" column, it's not possible to deactivate it, because it belongs to multiple groups across shops?

 
Dmitriy Benyuk
Reply

Yes, but only in case if you have the definite shop selected in the job settings drop-down.If no shop is selected it is possible.

 
René Poulsen
Reply

Ok, but I guess the product then would be deactivated in all shops? So it would not be possible to have a product that only exists in one of the shops?

If that's the case, is there anyway I can "listen" to some event when the import job is done - get the settings, so I can find products in the shop the import was importing to. Then I would be able to compare them myself, and then only deactivate the row with the right language id.

 
Niels Foldager
Reply

We are experiencing the same issues in a Dynamicweb solution where a few PIM shops have recently been added. Even though we have activated "Deactivate missing products" in the product import, the products are not deactivated. They should be deactivated because they no longer exists in the source data file. This is because the products are now both members of webshop product groups and PIM product groups. In the destination settings, the webshop is selected in Shop-drowdown.

We could solve this using a jobfinished observer, but we believe that Dynamicweb should be able to handle this in a standard way.

We hope you will investigate and come up with a solution.

Best regards,
Niels Foldager

 
Anders Ebdrup
Anders Ebdrup
Reply

Any thoughts here when having both PIM and Ecom in the same solution and need to have products deactivated after missing import from ERP?

 

Best regards, Anders

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Anders,
you could try to solve that by setting the options "Default Language" and "Shop" to "None", that will deactivate missed products across all shops and all languages.
Kind regards, Dmitrij
 

 
Anders Ebdrup
Anders Ebdrup
Reply

Dear Dmitrij,

 

I have found that the Ecommerceprovider calculates the default shop wrong. This is the current query to identify the default shop:

 

select top(1) ShopID from EcomShops order by ShopDefault, shopID

 

And the query sorts non-default shops before the default shop, so you should add "DESC" to the query, so it will be:

select top(1) ShopID from EcomShops order by ShopDefault DESC, shopID

 

Then our import job will work :-)

Best regards, Anders

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Anders,
that is very well spotted, thank you very much. I've created tfs# 83347 and will fix that ASAP.
Kind regards, Dmitrij

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Anders

Bugfix regarding #83347 EcomProvider: DefaultShop is calculated wrongly

Has been fixed in Dynamicweb package Dynamicweb.DataIntegration.Providers.EcomProvider  version 3.0.11

Also this is part of release 9.8.11

doc.dynamicweb.com/downloads/releases

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

 

You must be logged in to post in the forum