Handling inventory is a tricky stuff in retail industry. Business development team are very agile and comes up with innovative ideas of making sale of the goods from the store. Sometimes they give discounts to attract people and sometimes they sell goods in bundles. These bundles are either physically grouped or logically grouped. Physical grouping means packing couple of items in to one item and giving a SKU to it and logical grouping means the bundled product doesn’t exist physically but it is grouped with the individual items with their separate SKU. It would be good to provide both functionality to the customer.

How do we implement logical grouping?

Pretty simple – Let’s see it with an example. We would like to give a LCD monitor, wireless key board and wireless mouse with the purchase of desktop. I have created a product named “Desktop of the week” and add LCD monitor, wireless key board and wireless mouse as related items with the identify text “Product Group”. May be we can have a property for the product to distinguish whether it is regular product or packed product.

Excellent! The configuration is done in catalog manager. How do we capture the inventory of the grouped product as the inventory for LCD monitor, wireless key board and wireless mouse can be different. Now it’s time to implement our custom logic. We have to iterate each item to check whether the inventory is available for a particular item by calling commerce sever inventory pipeline component (other option is add the item to the dummy basket and run basket pipeline). If any of the item is out of stock then we will quality the bundled product as out of stock else we can accept to add that bundled product to the basket. Here is the flow chart which helps to get this logic.

image

Related Articles


If you like this post, please click on our sponsor advertisement.


Leave a Reply

Follow me on Google+
Couldn't get data from google+
Sign up for Newsletter