[ic] Stacking items

Schuyler Langdon interchange-users@icdevgroup.org
Tue Oct 29 12:49:02 2002


I've been stacking items (mulitiple mv_order_item, not using OnFly), so that
multiple items can be purchased with a single "click". This works as
expected, but when the first item has fields for it's matrix options, it
applies these chosen options (mv_sku) to all items. I looked through
Order.pm and found this line in the add_items function:
$item->{mv_sku} = $skus[$i] if defined $skus[$i];
It looks like every time through the loop $i is going to be 0 and mv_sku
will be applied to every item that is being added. I changed the line to:
$item->{mv_sku} = $skus[$j] if defined $skus[$j];
This works as expected, applying the mv_sku to the proper (first) item only.
It looks like this only comes into play with matrix options, but since it is
a core modification -- I was wondering if it would affect anything else?

--
Schuyler Langdon
GatorDev