Sorry, I don't know anything about displaytag. But if you want my opinion from a usability standpoint:
I would have a dedicated place in the GUI for your user's cart contents, or at least a dedicated place for a control that makes the cart contents visible (perhaps in the "rail", under his username, etc.). Then, when a user submits with "add to cart" from a search results page, I would redisplay the search results page, as you suggested, with some visual indicator next to products that are now in the user's cart (such as an item count -- I would leave them unchecked, this way the user can check them again if he wants to increase quantity of the same items). I would use this indicator (where necessary) on every product list or product details screen. This way, the user's view (product list) is not interrupted by adding things to his cart -- he is still in "shopping" mode. At the same time, he won't accidentally add something to his cart redundantly, thanks to the indicators. He only sees the full list of cart contents if he specifically chooses to view it (or perhaps also just before checkout). I never understood why I didn't see something like this down the right or left rail more often: Items in your cart -------------------- Item # Qty 434893 1 384821 1 993833 2 Perhaps it could have a header bar with a collapse/expand control if carts tend to get full. Erik -----Original Message----- From: "R.Vijayaraghavan" <[EMAIL PROTECTED]> Sent: Oct 10, 2005 8:29 AM To: Struts Users Mailing List <user@struts.apache.org> Subject: [OT] how actually to make a shoping cart Hello, I am very new to struts, moreover new to web development. I have to make a shopping cart and I am using displaytag to display the search results. Problems I am facing: 1. What actually should happen when a user selects a set of products and then clicks on the 'add to cart' button. Should the search page be re-displayed with the selected items already-checked? Or should the cart with the products be shown and tell the user to search again using the same search string? Has anyone made a shopping cart using displaytag in particular. I wanted to know how to mend it all together. regards, vijay. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]