How to sell the same item per piece or box using a single inventory location.
Although the data model of OFBiz supports this pretty well, the business functionality is however not provided. We propose to introduce 'virtual variants' of the actual product to document this alternative packaging to be able to process this through the system.
Current situation concerning virtual and variant products.
In OFBiz we have the virtual and variant flags on a product:
- When the virtual flag is set, it means that no inventory is kept for this product, it is just a place holder of a number of products in different variations. Example is a Tshirt with a undefined size and colour. The e-commerce application will request extra information to select the 'real' variant product.
- When the variant flag is set it means this is a fully defined product which can be stored in inventory. Example: Tshirt with a white colour in the size 10.
In order to make this work, you have to set up the features colour and size, link these features to the variant products and associate the two variant products via the variant association type to the virtual product.
In this case either the virtual flag is set or the variant flag is set, but not both.
New situation using virtual variants
But how to process when the above actual variant products are sold each, per box of 10 and per box of 100 with different prices?
To make this happen we want to introduce the virtual variant: both virtual- and variant flag are set and linked to the real product with the variant association. The real product can be the variant product in the current situation described above.
Then the real product should have the lowest denominator (in this case per 'each') and has a 'alternative package' association to a virtual/variant product which is an alternative packaging of the real product and can have an adjusted price but no inventory. The virtual variants will have the box quantity and if provided the selling price.
Adjustments to the system.
- Currently the e-commerce component checks for the virtual flag and want to show a feature selection list, however in the case of the virtual- and variant flag both set, it should not.
- The e-commerce component can show alternative packaging and price if the real product has virtual variants.
- When the box of 10 or 100 is selected, The real productId per piece is selected with the adjusted price of the box variant.
- If required the e-commerce can show the alternative packaging if it finds any virtual variants.
- The catalog product detail screen could show the virtual variant on the same screen as quantity, unit of measure and actual price. Price adjustments can be done by price rules.
- If required we need to store the original virtual product id in the shopping cart and orderitem to be able to show the original select product Id for display purposes. The system however will only process the the real productId in order and shipment processing. The original product Id can be shown on the detailed orderitem, shipment and invoice. (not implemented yet)
We have now committed this to the OFBiz trunk in revision 1040908.
If you like to comment enter below or reply to email@example.com.
A discussion can be found at on the ofbiz mailing list.
Posted on: 2010-11-03 13:45:40.648 By hansbak