Developer forum

Forum » Development » How to make a common stock pool for multiple webshops

How to make a common stock pool for multiple webshops

Allan Iversen
Reply

Hi,

 

I have a question regarding the ability to construct a common stock pool for multiple webshops in Dynamicweb. I got a sql table with the product numbers and the stocks. The product stocks aren't allocated to a specific shop.

 

I have a idea of validating the available stock with the requested amount with some kind of notification like "BeforeLineAdded" or/and "BeforeProductAdded/Increased and allocate the requested amount to the order through checkout.

 

What do you think about this? Anyone who have done something like this before? Any standard approach to this? I am receptive to any ideas :-)

 

- Allan

 


Replies

 
Nuno Aguiar
Reply

Hi Allan,

 

We have a webshop with a similar configuration.

 

Why do you even "duplicate" products? Why not create them in a webshop, and them just add them to groups of multiple shops. This way you have 1 product, 1 stock management, 1 of everything. It's how we do it.

 

Nuno

 
Allan Iversen
Reply

Hi Nuno,

 

I think you are right - it shouldn't be necessary to duplicate the products in my case. I think I will go with this.

 

What about the validation? I would like to inform the customers that the requested amount isn't available and afterwards probaly decrease the amount to the max available. Which notification do you use for this?

 

- Allan


 

 
Nuno Aguiar
Reply

Hi Allan,

 

We do not use any notifications. We use:

 - DataManagement for the product stock

 - Ajax call whenever cart is loaded (increase/decrease and/or before payment) and check the stock again (just in case someone else purchases the stock in the meanwhile)

 

Best Regards,

Nuno

 

You must be logged in to post in the forum