[ic] Strange behaviour when ordering multiple items w/options

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Thu Aug 29 12:47:00 2002


Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> Hello group, 
> 
> I'm using interchange 4.8.5 and Redhat 7.1 with PostgreSQL. I'm attempting to 
> fill the shopping basket with multiple items and options by posting variables 
> from the flypage. By looking at a [dump] in page ord/basket.html, I know that 
> a correct item+option example looks as follows in the shopping basket:
> 
> mv_sku	= '01.01.8001.01.8-I00'
> price_group = ''
> mv_ip = '0'
> code = '01.01.8001.01.8-I00-XL-RED'
> mv_ib = 'options'
> gift_cert = ''
> quantity = '3'
> 
> When I attempt to add items via my flypage however, the same dump look as 
> follows: (hint: -XS-BLU is appended to the mv_sku)
> 
> mv_sku	= '01.01.8001.01.8-I00-XS-BLU'
> price_group = ''
> mv_ip = '0'
> code = '01.01.8001.01.8-I00-XL-RED'
> mv_ib = 'options'
> gift_cert = ''
> quantity = '3'
> 
> The relevant cgi variables posted to the basket, as shown by the same [dump],
> are: 
> 
>           'mv_nextpage' => 'ord/basket',
>           'mv_todo' => 'refresh',
>           'mv_session_id' => '8thp7RLd',
>           'mv_ip' => '0\00\00\00\00\00\00\00\00\00\00\00\00\00\00',
>           'mv_sku' => '01.01.8061.01.8-I00',
>           'mv_ib' => 'options',
>           'submitbutton' => 'Check Out',
> 
> This shows that the correct mv_sku is being posted to the form! The variables 
> mv_order_item and mv_order_quantity are both posted multiple times (the fact 
> that they arrive OK is proven by 'code' and 'quantity' being processed 
> correctly by the basket), but for some strange reason the mv_sku that is 
> posted as '01.01.8061.01.8-I00' (according to the cgi-variables) arrives in 
> the shopping basket with an additional '-XS-BLU' code (which probably has its 
> origin in the 'options' table rather than table 'products'). 
> 
> Is this behaviour by design or a bug in interchange? What can I do to 
> correctly set the mv_sku in the shopping basket? In which file can I find the 
> code that actually populates the shopping cart? Getting this part of the 
> store to work would be a major breakthrough for me!
> 

Have you looked at the example in flypage? I presume you have.

The key is that the variables have to correspond in index, i.e. if
you have multiple mv_order_item and mv_order_quanity there have to
be matching copies of mv_sku. Your mv_ip and mv_ib should never
be posted.

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

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry