How to commit change when doing manual database update

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I did a bulk update to the storeMapping table but the changes are not taking effect on the respective store sites.  

Example:
I have store 1, 2 & 3.

I inserted two records in the StoreMapping Table to display the product in store 1 and 2 but not 3.
  INSERT INTO StoreMapping([EntityId], [EntityName], [StoreId]) VALUES ('4153', 'Product', '1')
  INSERT INTO StoreMapping([EntityId], [EntityName], [StoreId]) VALUES ('4153', 'Product', '2')

When I enter the edit screen in the admin for product '4153', store 1 and store 2 are accurately showing stores 1 and 2 in the 'Limited to stores' text field. Store 3 is not in the field. HOWEVER, product 4153 is still showing in the product listing of the the public store 3.

If I hit the save button in the nopCommerce product edit screen, the problem is fixed. This is not an acceptable solution as I have an API that is handling product updates from a outside CMS that is on our Intranet.

I've tried clearing the cache and restarting the application and neither is committing the changes.

How can I get this to work with out using the nopCommerce admin?
7 years ago
cojodev wrote:
How can I get this to work with out using the nopCommerce admin?

There's a bit column in the Product table called LimitedToStores, set it to 1 for the product.
7 years ago
Yes...as Pete said, you MUST set the LimitedToStores value to true on each pertinent product, or else the StoreMappings table never enters the picture...
7 years ago
I must have looked at that table 4 times to compare a working item vs. a non-working item. Completely missed it. Thank you!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.