Support for selecting whether catalog import should skip price and inventory handling or not

Vote:
 

If an imported catalog xml file does not contain prices, existing prices are removed. This is due to importer using an empty IPriceValue list and saving it using PriceService.SetCatalogEntryPrices(...). That service/method expects to have a complete set of prices, and that combined with an empty list leads to all prices being lost.

However, the same logic does not apply to inventories. Existing inventory rows are kept even if they are not added to the xml. Current implementation is contradictory and confusing. One "just has to know" how importer works with different kinds of data.

One suggestion for a better solution is to e.g. provide boolean flags in the public interface of importer (Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport) for controlling if prices or inventory should be completely ignored by the importer.

#182931
Oct 02, 2017 8:17
Vote:
 

Hi Tomi,

I agree that this is a valid case, we will look into it.

The current workaround is to have make your implementation of IPriceService do not delete prices if the price list is null. 

And inventories and prices, while have fairly similar characteristics, they are not the same, so there might be difference in the way they behave.

#182934
Oct 02, 2017 9:33
Vote:
 

Hi Tomi,

I have started to investigate this issue and cannot reproduce on Commerce 11 (there is a check that prevents prices being saved if the list of prices is empty). Which version are you running on? 

#183075
Oct 04, 2017 14:09
Vote:
 

Commerce version is 11.2.0.0.

#183077
Oct 04, 2017 14:22
Vote:
 

Can you provide me with a sample catalog.xml where you observe this behavior? I'm unable to reproduce the issue on Commerce 11.x

Send by email to magnus(dot)strale(at)episerver(dot)com

Thanks!

#183096
Oct 05, 2017 10:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.