[ic] cant find documentation for creating second shopping cart

Ed LaFrance interchange-users@icdevgroup.org
Thu Oct 10 12:22:01 2002


At 11:27 AM 10/10/2002 +0100, you wrote:
>Mike Heins wrote:
>
>>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.',
>>        };
>>
>>
>Hi - just a quick query here. am i right in thinking that if i want to add 
>a new key and value to the shopping cart data scructure it is pretty 
>straightforward? I am considering going with a one shopping basket 
>solution and just having something on the basket page to indicate that an 
>item ordered was ordered via the "quick catalog order" option. I'm 
>thinking that it should be possible for me to put something like 
>quickorder => 1 in the perl structure and then access it on the basket 
>page with [item-quickorder]. Am i right in thinking this and if so could 
>you tell me the correct syntax?
>
>thanks
>
>John Allman

This is what item modifiers were for. They are generally being replaced by 
item options in recent flavors of interchange, but the modifier is still 
useful IMHO, particularly because it is a nice way to attach an arbitrary 
attribute to an item in the cart:

1. in catalog.cfg:

         UseModifier foo


2. on an order form:

         <input type=hidden name=mv_order_foo value=1>

3. in the basket/checkout cart display:

         <input type=hidden name="[modifier-name foo]" 
value="[item-modifier foo]">
         foo: [item-modifier foo]

         (shows 'foo: 1')

..and place [item-modifier foo] on receipt.html, report, mail_receipt, etc 
as needed.

- Ed L.




===============================================================
New Media E.M.S.              Technology 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
===============================================================