[ic] recalculate not collapsing items with matrix options

Kevin Walsh interchange-users@interchange.redhat.com
Fri Apr 5 08:41:01 2002


> 
> I have a number of items that have matrix options.  In each case,
> there's just a single attribute which determines which SKU is actually
> being ordered.  A common one is flavor.
> 
> I have SeparateItems set to No.
> 
> [snip]
> 
> I'm puzzled, as it seems that recalculate does not run the same
> algorithms to clean up the shopping cart as buying an item would.
> 
> Originally I had been using simple options, as these are adequate for
> what I'm trying to do, but I ran into some serious problems with
> SeparateItems set to No (as mentioned in the archives of this mailing
> list).  I tried setting it to Yes and calling [recombine] at the start
> of basket.html, but this still gave the same behavior i.e. new items
> added to the cart would get munged in with the matching old item, but
> recalculate wouldn't collapse items.
> 
> [snip]
> 
> It seems to me that the most elegant solution might be to modify the
> cart component and allow passing of another undocumented parameter
> (like continue_shopping) which munges any duplicate items together --
> there's an obvious place to do this right before the items are
> displayed.  I don't like the [recombine] approach too much because A)
> the cart component is called from a lot of places and B) it doesn't
> work for recalculations.
> 
> Anyone out there with a simple clean solution to the problem?
> 
How about keeping the items separate in the cart, and combining
them in the order route instead.

I don't use auto-combining stuff myself because of this:

    1) User adds item to the cart with option A.
    2) User adds same item into the cart with option B.
    3) User changes option B to A on the cart page and the
       cart auto-combines the items to make qty 2.
    4) User changes his mind about the option and finds
       that the only way to ungroup the items is to delete
       and re-add them, or to mess about in other ways.
    5) User gets frustrated and throws his monitor at you.

If you keep the items separate in the cart and only auto-combine
them when they submit their order, you avoid all that violence.
You get neatly grouped items in your transaction records, the
customer sees neatly grouped items on the receipts/email and
there is no drama.

As a user myself, I don't always like things that happen
automatically.  If you have qty discounts, you can make product
groups that will take all the separate items, with the same SKU,
into account.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/