during the checkout how to grab a list of products at the screen action level?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

during the checkout how to grab a list of products at the screen action level?

Patrick-4
Depending on the products ordered, I am changing the flow of the
shopping cart.  I need to grab a list of ordered products at the
screen action level either from the parameters or from a db query.
I've found the item
"shoppingCart=org.ofbiz.order.shoppingcart.WebShoppingCart@721c650d"
in the parameters context, so I think I should be able to manipulate
it to give me a list of productIds.   Can you give me a few hints?
Thanks in advance.  Patrick
Reply | Threaded
Open this post in threaded view
|

Re: during the checkout how to grab a list of products at the screen action level?

Rishi Solanki
If you are getting the object of WebShopiingCart then it is good. Get the
items from shoppingCart.items().
It will return you list of ShoppingCartItem which in turn have product and
productId associated to each item.
shoppingCart.iterator will return iterator of cart items. You can not get
this list from entity as it will not saved till we call for submit order.

Probably you need to add custom method for your own to get list of
productIds. For the same the above information will help.
But my suggestion is to use shoppingCart.items method directly so that you
will get the ShoppingCartItem list which in turn have the product and
productId for each line and other supporting things to display on UI.

Hope that helps.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Sat, Feb 20, 2010 at 7:03 AM, Patrick <[hidden email]>wrote:

> Depending on the products ordered, I am changing the flow of the
> shopping cart.  I need to grab a list of ordered products at the
> screen action level either from the parameters or from a db query.
> I've found the item
> "shoppingCart=org.ofbiz.order.shoppingcart.WebShoppingCart@721c650d"
> in the parameters context, so I think I should be able to manipulate
> it to give me a list of productIds.   Can you give me a few hints?
> Thanks in advance.  Patrick
>