Im making a user control to import/Update/Delete products in ucommerce. This works fine, but if i set the DisplayOnSite to false through the api, the product is shown.
IStatelessSession statelessSession = (sessionProvider as SessionProvider).GetStatelessSession();
product.DisplayOnSite = false;
product.ModifiedOn = now;
product.ModifiedBy = "admin";
statelessSession.Update(product);
product.Save();
I have tried with both save and update method, but nothing works. Is there som cache i need to clear?
I have tried to do an iis reset but the products is still shown. If i go to the product in ucommerce the property displayonsite is correctly set to false
Importing products and cache
Hi,
Im making a user control to import/Update/Delete products in ucommerce. This works fine, but if i set the DisplayOnSite to false through the api, the product is shown.
ISessionProvider sessionProvider = ObjectFactory.Instance.Resolve();
IStatelessSession statelessSession = (sessionProvider as SessionProvider).GetStatelessSession();
product.DisplayOnSite = false;
product.ModifiedOn = now;
product.ModifiedBy = "admin";
statelessSession.Update(product);
product.Save();
I have tried with both save and update method, but nothing works. Is there som cache i need to clear?
I have tried to do an iis reset but the products is still shown. If i go to the product in ucommerce the property displayonsite is correctly set to false
So what am i missing in the import function?
Hi Anne,
The Api doesn't take DisplayOnSite into account. You have to query them away yourself.
Can you paste the code from where you fetch the products to be shown on the page?
Regards
Morten
is working on a reply...