[ic] Deleting carts

Ed LaFrance interchange-users@interchange.redhat.com
Mon Oct 29 12:28:15 2001


At 05:04 PM 10/27/2001 +0100, you wrote:
> > > Where in the stock foundation catalog are the cart contents deleted after
> > > an order is placed?
> > >
> > Within the core code (VENDROOT/lib/Vend/Order.pm, I believe).  You can
> > control this in your checkout profile with &final (&final=yes submits the
> > order and clears the cart contents; &final=no or the absence of &final will
> > cause the cart contents to remain).
> >
>The profile part is correct.
>
>The actual code that removes the cart contents, if you want to
>see it, is in the bin/interchange perl script.  Look at the
>%form_action hash, where you will find the 'submit' key and its
>associated sub.  The cart is cleared at the end of that sub with
>the following code:
>
>     # Remove the items
>     @$Vend::Items = ();
>

Kevin - you're quite right, thanks for this.  Seems like there is quite a 
bit of similar-reading and/or interwoven code in Order.pm vs. the 
interchange script; unraveling it makes my head hurt sometimes!

- Ed L.



===============================================================
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          eCommerce | Consulting | Hosting
Placerville, CA  95667         edl@newmediaems.com
(530) 622-9421                 http://www.newmediaems.com
(866) 519-4680 Toll-Free       (530) 622-9426 Fax
===============================================================