Developer forum

Forum » Development » New Shop not showing in "Product Catalog"

New Shop not showing in "Product Catalog"


Reply

I created a custom module that creates a new shop via the DataManager in your API, my code looks like this.

 

'''''

DataManager DBM_CreateShop = new DataManager();
DataSet DS_CreateShop = DBM_CreateShop.getDataSet( "Dynamicweb.mdb", "SELECT * FROM EcomShops" );

DataRow NewShopRow = DS_CreateShop.Tables[ 0 ].NewRow();
DestinationShopID = "SHOP100";
NewShopRow[ "ShopID" ] = DestinationShopID;
NewShopRow[ "ShopName" ] = NewShopName;
NewShopRow[ "ShopCreated" ] = DateTime.Now;
NewShopRow[ "ShopDefault" ] = false;
NewShopRow[ "ShopIcon" ] = "";
// Add new row to SHOPS dataset
DS_CreateShop.Tables[ 0 ].Rows.Add( NewShopRow );
// Save data.
DBM_CreateShop.updateDataSet( DS_CreateShop );
// Clean up
DBM_CreateShop.Dispose();

'''''

 

And it works like a charm, the shop is created and when i look in the database its created as it should.

But when i go into the eCommerce my shop isn't showing in the Product Catalog along with all the other shops.

 

How do i update the list in my CustomModule?

 

 

 


Replies

 
Reply

It works for me. If you're using eCommerce Light, you're only allowed one shop, and that might be the issue here.

 
Reply

That's not the problem in this case.

 

It seems to me that the Treeview in the ecommerce is cached somehow,

After creating my shop it's in the DB, but the tree isn't reading it the new values.

 

Is DW caching the treeview when it's shown the first time?

 
Reply

No, and clicking the refresh button above the menu should be enough.

 

Do you have multiple languages on your site? My thought was that you might need a relation between language and the newly created shop.

 
Reply

Restarting my website application fixes the problem.

But i cant do that everytime someone uses my module.

 
Reply

Well, as I said, I can't recreate the problem locally. But restarting also has an effect on Dynamicweb. New updates to the database are being performed in that process, so how does it behave now, when you create a shop in the database?

 

Btw my IE is set up to check for new versions of stored pages every time I visit the site.

 

You must be logged in to post in the forum