In response to an idea from a long-standing customer, I’ve been working on a system that allows the Shop Owner to make a product that is made out of other products.
Imagine for example, a shop that sells plates, knives, forks, spoons, cups, glasses – and they want to sell a “bundle” of those as a “Dinner Service”. Or perhaps a surfing shop who wants to put together a “beginners bundle” of wetsuit, rash vest, surfboard, leash – these items would be “slaves” of the beginners bundle.
So, I set about making it. It was actually fairly straightforward up to a point. In the following, I’ll take the “surfing” idea;
Firstly, the Shop Owner needs to add the slave products (board, wetsuit, leash, vest) – this is done in the usual way via the admin section.
Step 1: add the master product AND the ability to add slaves (and their quantity) to that product. This is done in the usual way, via the admin area. However, there is a new addition on the product adding/editing page, as so;
The ID input box is the product ID of the slave. The quantity input box is how many of that ID are included in the “bundle”. More slaves can be added by pressing the +Add Slave link;
Once the product is ready, press “save”. The bundle is now available for sale in the shop. At this point, the Shop Owner is expected to have made a good description for the bundle as I have not coded an automatic way for the bundle to show it’s slaves. Would that be needed?
Step 2: Buying the Bundle. This is done in the usual way by the customer, using the usual checkout process. Once the bundle is purchased, the quantities of all the slaves are reduced appropriately. In this way, stock control can be maintained.
Have a look at this video which I made, which shows a different example. In this one the “Test Product” is a slave of the “Graphics Card”.
1. Show Slave Products on the Master product_info.php page.
2. Check stock of all slave products before allowing checkout (by this I mean that if a master needs 4 of a particular slave, yet only 3 slaves are in stock, pop up the out of stock message).
Let me know what you think of it so far?