Re: Composite products

Originally Posted by
Mikado
I have composite products (kits).
Example:
- prod n°47 = prod n°149 + prod n°16 + prod n°83
- prod n°81 = prod n°102 + prod n°55 + prod n°83
When I sell a prod n°47, I would like that the stock of products n°149, n°16 and n°83 is decremented by 1.
What is to be done?
As Kobra said, there is no native functionality for this in Zen Cart.
I have previously developed a 'composite product' product type for a client, and it does maintain inventory control for both the composite product and the component products. When a composite product is sold, the stock levels of the component products are reduced. Likewise, when a single component product is sold, the stock level of the composite product is recalculated as well.
If for example you have a composite product A, that is comprised of 1 x product B and 3 x product C. If current stocks of B and C are 4 and 10 respectively, the cart knows that the stock for product A can only be 3, because that's all that 10 x product C allows for. If somebody buys 2 x product C, the cart recalculates the stock for product A and will reset it to 2.
This sort of capability does require modifications to the database and the order class file (although I'm in the process of recoding it to use the notifier system instead of a modified class file).
Neville
An assumption is what you arrive at when you get tired of thinking...
Bookmarks