[ic] Update cart contents, preventing re-order?

Jonathan Clark interchange-users@icdevgroup.org
Tue Oct 1 06:37:02 2002


> After ordering, a customer returns to my order page, a page that
> provides a
> friendly interface for ordering multiple items (in tabular form
> by size and
> color). This order page orders multiple items by setting
> mv_order_item and
> mv_order_quantity fields.
>
> I'd like to have my page update the existing shopping cart
> (replacing the old
> values with the new ones instead of incrementing them/creating new
> orderlines)? I've already been visiting sub add_items in the
> Order.pm module
> but surely there is a more simple, straight-forward way?

I have done this before with a usertag which sets the form values from the
cart, and then clears the cart. Then, when the user submits again, cart is
loaded fresh.

see http://shop.weborda.com/?shop=demo1 - select something to order, click
'Order >>' and then click 'Back to Order form'.

If you need to maintain the cart, you could probably clear it in advance of
the order bit.

Jonathan
Webmaint.