lushlongboards Posted February 7, 2004 Share Posted February 7, 2004 I tried master products contribution but it's not what I want and it looks like quite a few others have similar issues. The idea is to update the stock of a number of sub-products in a bundle when a single item is purchased. The cost of the single item does not need to be related to the total cost of the items in the bundle, so deals can be applied. All products in the bundle are normal, only the main product needs an extra field. Sub-products in a bundle may be used in any number of master products (eg bearings on a skateboard) I'm working on the following concept; my PHP and knowledge of OSC is still young so it will take a few weeks.... A) are there any other contribs that will do this? B) Shall I try and make it into a contribution module? Add a field into the products information (eg "bundle_contents") Insert into this field a string containing the codes/SKUs for the subproducts (eg "23&45&65&111"). I'm not sure what delimiter would be best at this point. When the product is displayed, PHP checks to see if the product has data in this field. If data exists, it prints a simple list of bundle contents in the product info part. This list may be extended to include a "saving" figure if I can get it to calculate the total cost of the contents and compare with the product price. No other changes are made until "callback" after order (I have not found this file yet). This file will check each product for bundle_contents before updating stock. If bundle_contents contains bundle data (product contains others) then it will expand and update the stock of each subproduct. If anybody sees any flaws or suggestions please submit here, or email me. If I can get it to work it may be worth a new contribution as it is a different approach to "Master Product" chris Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.