[ic] cant find documentation for creating second shopping cart

Mike Heins interchange-users@icdevgroup.org
Wed Oct 2 17:27:01 2002


Quoting Jeffrey Cox (jeff@cwindustries.net):
> >
> > rrraarrrr! Ed :)
> >
> > I don't know what that is about, but it seems like any install of
> foundation
> > would have 'main' magically appear. To find out otherwise a little
> searching
> > is in order (in the docs).
> >
> > I have never done it but you might want to try looking at 'mv_cartname'
> >
> 
> Running multiple carts isn't to difficult. However, if you didn't install
> things your self there creating another cart may or may not be all that
> simple. Look up the installation instructions in the documenation and follow
> those.

I think people are getting confused.

I think when the original questioner was saying "multiple carts", he meant
that. Not multiple catalogs.

You can create a cart from a URL:

    http://USUAL_CGI_PATH/order?mv_cartname=newcart&mv_order_item=foo

That will order the item "foo" and place it in the "newcart" cart.

To display things from that cart, do:

   [item-list cart=newcart]
        [item-description]: [item-price]
   [/item-list]

To make the cart the default cart in that page transaction:

   [cart newcart]

Now a regular [item-list] without a name will use that cart, as
will [shipping], [salestax], etc.

You do have to set the current cart every time, i.e. it always
starts out with "main" being the current cart.

As with most IC things, it is just a perl data structure. 

  $Session = {
                carts => {
                    main => [],
                    newcart => [
                         { code => 'foo', quantity => 1, mv_ib => 'products' },
                        ],
                },
             etc => 'etc.',
        };

I believe this might be covered pretty well in ic_ecommerce. I know
that at one point I did some pretty copious examples for the docs, but
whether they made it through the great docs transition I don't know.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman