aspose file tools*
The moose likes Other Application Frameworks and the fly likes Problem with a shopping cart application using Stripes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Problem with a shopping cart application using Stripes" Watch "Problem with a shopping cart application using Stripes" New topic
Author

Problem with a shopping cart application using Stripes

Alain Altet
Greenhorn

Joined: Jul 08, 2009
Posts: 1
I'm trying to implement a simple shopping cart for an e-commerce site I'm building for my wife using Stripes (great framework, by the way), and everything is working fine so far, except for one thing: I can't update the quantity of a particular item once it's been added to the shopping cart.

I can hit the "Add to cart" link again and it will update the quantity, but I also want to be able to type in the exact quantity directly in the quantity field.

This is my shopping cart Action Bean:



and this is my shopping cart JSP:



The form is populated by iterating thru the items in the cart. I have no problem removing a single item from the cart, but I have no idea how to reference a particular item in the cart (which I suppose is mandatory in order to be able to update said item). Anyone know how to achieve that?

By the way, I'm using a ShoppingCart class that implements a singleton pattern, so the shopping cart can be accessed from any action bean. I added this class as an extension to Stripes.

Thanks in advance!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with a shopping cart application using Stripes