ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Robinson <jus...@venturenet.co.za>
Subject building itemized component product listing in the cart view
Date Tue, 29 Mar 2011 13:14:17 GMT
I've set up configurable products, with variants in the choices; just
like the PIZZA product on demo-stable.ofbiz.apache.org.
What I need is an itemized component product listing in the cart view,
showing the description and price of each component variant product

In the cart view on the demo-stable.ofbiz.apache.org for the PIZZA
product it does show the selected Config Option's description, but
nothing about the underlying varients.
If someone could let me know where the logic for this is located I can
build on to it.

The solution I came up with might be a really long way round:
Add a field to org.ofbiz.order.shoppingcart.ShoppingCart to hold a ref
to ProductConfigWrapper, which is set when it's passed into
addOrIncreaseItem, during the customer's configuarion of the product.
So if I have a ShoppingCart instance I can get the last associated
ProductConfigWrapper, then get the configId from it then do a lookup
via ProductConfigConfig and ProductConfigProduct entities to get the
list of productId's for the configuartion, then I can get product
descriptions and component prices from ProductAndPriceView enity using
the productId.

Venture-Net Research & Development

View raw message