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

marc.brevoort interchange-users@icdevgroup.org
Fri Aug 30 04:08:03 2002


On Thursday 29 August 2002 18:46, you wrote:
> Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> > First of all, thanks for your rapid reply Mike.
> >
> > On Thursday 29 August 2002 17:46, you wrote:
> > > Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> > > > Hello group,
> > > > 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'
> > > >
> > > > When I attempt to add items via my flypage however, the same dump
> > > > look as follows:
> > > >
> > > > mv_sku	= '01.01.8001.01.8-I00-XS-BLU'
> > > >
> > > > 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').
> > >
> > > 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.
> >
> > Okay, I stopped posting mv_ip/mv_ib and I've interlaced a hidden input
> > mv_sku with mv_order_item and mv_order_quantity now.
> >
> > The dump now shows:
> >
> > {
> > 'price_group' => '',
> > 'mv_sku' => '01.01.8061.01.8-I00-XS-STL',
> > 'mv_ib' => 'options',
> > 'code' => '01.01.8061.01.8-I00-L-STL',
> > 'gift_cert' => '',
> > 'quantity' => '5'
> > },
> > {
> > 'price_group' => '',
> > 'mv_sku' => '01.01.8061.01.8-I00-XS-STL',
> > 'mv_ib' => 'options',
> > 'code' => '01.01.8061.01.8-I00-L-BDC',
> > 'gift_cert' => '',
> > 'quantity' => '4'
> > },
> > ... *snipsnip* ...
> >
> > Variable mv_ip no longer shows as part of the cart. mv_sku still has
> > appended item options, although the posted mv_sku now shows as
> >
> > 'mv_sku' => '01.01.8061.01.8-I00\001.01.8061.01.8-I00\0...'
>
> Hmm. I think that the ability to accept separate mv_sku variables for
> the "separate widgets" prevents ordering multiple matrix items. My guess
> is you can't do what you want to do.
>
> Sounds like you will need to post-process or create your own
> order action. I suggest that you look at bin/interchange and
> the "add_items" routine. That is what does the update, and there
> is no reason you can't create an ActionMap like "matrix_order" and
> override the current interface.

Okay, thanks Mike, I'll take a look at it! If I come up with something 
workable, I'll post it to the group!

Regards,

Marc Brevoort