November Happy Hour will be moved to Thursday December 5th.

Help debugging what commerce content is shown on website and in Commerce Admin interface

Vote:
 

Hi forum

We are importing our product catalog from InRiver PIM using a modified version of the adapter provided by PIM. But basically this adapter imports data into Episerver by importing a Catalog.xml file. We are using Episerver.Cms.UI: 10.4.0 and EPiServer.Commerce.UI.ManagerIntegration 10.2.2.

We are now trying to change some properties on a CatalogNode. We change the properties in the XML file and try to import the file. What I have found so far:

1) The /episerver -> Commerce -> Catalog interface (not Commerce Manager - don't know what the proper name for this interface is) is not updated.

2) Data is changed in the CatalogContentProperty database table, so we do receive the data from the XML file.

3) Our website is also changed, so the customers will see the changes.

I have then tried to change something in the Commerce catalog UI directly. That is both reflected in the UI, on the website and in the CatalogContentProperty table.

My first thought was that it is a versioning problem, but we have set this appsetting in web.config:

As far as I can see, we can't rely on the Commerce UI showing the correct data when we update or catalog by importing Catalog.xml files. Is that true?

Thank you for your help and insight.

Regards

Anders

#175313
Feb 16, 2017 9:48
Vote:
 

No, it's not true. If properly configured, the Commerce UI (we use the term "Catalog UI") should display the value correctly. It sounds like a caching problem to me

Are you updating in the context (via inRiver) of same site, or on another site? If you update something from Commerce Manager, is the value updated correctly in Catalog UI?

#175314
Feb 16, 2017 10:12
Vote:
 

Hi Quan

I'm glad to hear that something is wrong, and it was not ment to work that way.

I will try to change something using the Commerce Manager.

When you say "Site", can you elaborate on that? I can see that there is a <Sites> tag in the beginning of the Catalog.xml from PIM:

<Sites>
      <Site>bca3783a-47e2-25b4-b029-28b07d68d063</Site>

</Sites>

This looks like a GUID. What should that match in Commerce/CMS?

Regards

Anders

#175315
Feb 16, 2017 10:16
Vote:
 

No, when I said "Site" - I mean different IIS site. For example our customers might have a main site (with Catalog UI installed and such), but they import the catalog into another site (with ServiceAPI installed). Those two sites share the databases, of course.

#175318
Feb 16, 2017 10:23
Vote:
 

Ah, of course.

Right now I'm investigating in my development environment, where I only have one server that is running from iisexpress/Visual Studio.

I have tried to stop/start the solution from Visual Studio because I also suspected a caching issue, but I would expect that when I restart the site by pressing F5 again, all caches would be cleared. However the Catalog UI still shows the data that I have entered through that UI, and not the data that I have imported from the Catalog.xml file.

I have just tested using Commerce Manager. Commerce Manager correctly shows the name received from Catalog.xml.

Updating data in Commerce Manager affects both whats displayed on the website and what is displayed in the Catalog UI.

So this only seems to be a problem when updating catalog nodes through the XML import. I think we have another issue with the XML import, where changes to entries are not registered in the CatalogContentEx table, but I haven't finished debugging this. Do you know if you have made changes to the XML import in Episerver 10?

Thank you for your help.

Regards

Anders

#175320
Edited, Feb 16, 2017 10:37
Vote:
 

I don't know how inRiver connector works internally - but if they are using the right APIs then it should work without problem.

I would suggest you to turn on the version gadget to see if Catalog UI is loading the correct version or not

#175328
Feb 16, 2017 11:13
Vote:
 

The InRiver adapter is open source, so I have looked in their code. This is what they do:

            XDocument catalogDoc = XDocument.Load(catalogXml);
            MemoryStream handledCatalogStream = new MemoryStream();
            catalogDoc.Save(handledCatalogStream);
           
            // Make it readable again
            handledCatalogStream.Position = 0;
            CatalogImportExport cie = new CatalogImportExport();
            cie.ImportExportProgressMessage += this.ProgressHandler;
            cie.Import(handledCatalogStream, AppContext.Current.ApplicationId, string.Empty, true);
So they are just using the CatalogImportExport to import the new CatalogXml. This catalog XML is an XML file that more or less only contain the CatalogNode being changed.
Regarding versioning, I thought that I had turned off versioning by adding this to AppSettings:
<add key="DisableVersionSync" value="true" />
I have enabled the Versions Gaget, and I can see when I change data from Commerce Manager, a new version is generated, or at least the "Saved" timestamp is updated in the version gaget. It seems as if the number of old versions stay the same, perhaps because I have created old versions before I added the AppSettings key. However when I import XML data, nothing is changed in the Versions gaget. So is it a question of the CatalogImportExport not working correctly with versions? Is this something I can fix?
Regards
Anders
#175329
Feb 16, 2017 11:49
Vote:
 

Hi Quan

I have submittet a developer support request. I have added a link to this thread to the support request.

I hope that we can get to the buttom of this issue soon.

Regards

Anders

#175341
Feb 16, 2017 20:51
Vote:
 

Hi Anders,

I know this thread is very old, but I am currently facing the same issue. Do you remember the resolution to your problem?

#222919
May 13, 2020 20:23
* 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.