Issue with fetching SKU's

Vote:
 

Hi Team,

I am facing issues in fetching the catalog sku's.

Please find the code below

private static IContentLoader contentLoader = ServiceLocator.Current.GetInstance();
var catalogRoot = contentLoader.Get(Guid.Parse(catalogReference.CatalogContentReferenceId));
var currencySKUs = contentLoader.GetChildren(catalogRoot );

The above code is returning the sku's.

But if I remove any sku relation from the catalog, then its is not reflected in the results until I recycle my apppool.

Can you let me if I need to do any configurtaion for this.

CMS version - 7.11
Commerce 7.5

Thanks in advance.

Thanks & Regards,
Manjeera T

#154846
Aug 31, 2016 12:59
Vote:
 

Hi,

How do you "remove any sku relation from the catalog" - if I understand correctly so you mean if you "remove/detach" a sku from a category? Do you do it in Catalog UI or Commerce Manager?

The issue sounds like a caching problem to me - so if you remove the relation in one site and the code runs in another site - check if the configuration for events broadcasting is correct.

Regards,

/Q

#154847
Aug 31, 2016 13:07
Vote:
 

Hi Quan,

If I am trying to remove the relation in commerce manager and try to verify in my application(different app where sku’s will be shown in dropdown), it is not reflecting. Still I am able to see the sku.

Thanks,
Manjeera T

#154850
Aug 31, 2016 13:35
Vote:
 

As I said, your application should have correct configuration for events broadcasting, so the event listeners in Commerce can listen to the events and react (clear the cached data).

As you mentioned "apppool" so I suppose it's a web application. Make sure to enable this in web.config/system.serviceModel

    <services>
      <service name="EPiServer.Events.Remote.EventReplication" behaviorConfiguration="DebugServiceBehaviour">
        <endpoint name="RemoteEventServiceEndPoint" contract="EPiServer.Events.ServiceModel.IEventReplication" binding="customBinding" bindingConfiguration="RemoteEventsBinding" address="soap.udp://239.255.255.19:5000/RemoteEventService" />
      </service>
    </services>
    <client>
      <endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
    </client>
#154851
Edited, Aug 31, 2016 13:39
Vote:
 

Hi Quan,

Iam receiving error after placing this.

Please check the configuration below

<system.serviceModel>
<services>
<service name="EPiServer.Events.Remote.EventReplication" behaviorConfiguration="DebugServiceBehaviour">
<endpoint name="RemoteEventServiceEndPoint" contract="EPiServer.Events.ServiceModel.IEventReplication" binding="customBinding" bindingConfiguration="RemoteEventsBinding" address="soap.udp://239.255.255.19:5000/RemoteEventService" />
</service>
</services>
<client>
<endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
</client>
<behaviors>
<serviceBehaviors>
<behavior name="DebugServiceBehaviour">
<serviceDebug includeExceptionDetailInFaults="true" />
<!--TODO: the option should be only in test environment true in the production should be false-->
</behavior>

</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="RemoteEventsBinding">
<binaryMessageEncoding />
<udpTransportCustom multicast="True" />
</binding>
</customBinding>

</bindings>

</system.serviceModel>

Thanks,

Manjeera T

#154858
Aug 31, 2016 14:45
Vote:
 

I am thinking error might be because of "customBinding".

Please check the configurtaion.

Thanks,

Manjeera T

#154859
Aug 31, 2016 14:46
Vote:
 

Hi Quan,

Issue is resolved.

Thanks for the help.

Thanks,

Manjeera T

#154860
Aug 31, 2016 15:22
Vote:
 

Manjeera, it would be great if you also posted what fixed your problem. 

#155041
Sep 08, 2016 10:16
* 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.