[ic] Cart update is freaky

Daniel Davenport ddavenport at newagedigital.com
Wed Jun 30 20:50:55 EDT 2004

> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org]On Behalf Of Mike Heins
> Sent: Wednesday, June 30, 2004 4:34 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Cart update is freaky
> Quoting cHao (dont.botherme at verizon.net):
> > A client of ours has a product people will order in multiple
> > sizes at once.
> > For confidence's sake, let's assume they're T-shirts.  Someone
> > browsing the
> > site might want to buy 10 large, 10 medium, and 10 small shirts.
> > Interchange adds them to the cart, and all is well so far.
> >
> > (For reference, the size is a simple option with a price
> > differential.  Each
> > size of shirt is a different price, but all share the same SKU.)
> >
> > The problem comes when the buyer changes their mind and decides
> > they only
> > want 8 medium shirts.  The way the current cart component and
> > checkout form
> > seem to work, they don't know how to remove or update any but
> > the first item
> > in the cart.  I assume this is because the products in the cart
> > all have the
> > same SKU, but i'm not sure.
> That probably means you toyed with the order of the variables in the
> cart, or totally removed the variables that show the quantity.
> You need to have any remove box before the quantity variable, and you
> need to have a variable for the quantity of each item, even if only
> in a HIDDEN.
> This is the type of thing a competent consultant could show you in
> just a few minutes, and I think it is even in the docs somewhere if
> you look.

heh.  While i have edited some things in the catalog, i've saved the cart
page for the last day or two, precisely because i'm not familiar with the
way Interchange processes forms.  I've stuck to the simple parts, and
usually danced around Interchange and used plain CGI between the pages i

I diff'ed the cart component with the foundation cart and the one from the
tarball (i knew keeping around would come in handy :)) and found something
quite strange:
the catalog's cart, aside from the edits i made (all of which i remember),
appears to have changed quite a bit from the foundation's cart.  What's
strange is that a couple of the tags appear to have been parsed.  Not all of
them; no, that could be easily chalked up to some nitwit 'view source'ing a
catalog's cart and copying it over.  Only certain tags have been replaced.
The [modifier-name foo], [quantity-name], and [list]bar[/list] tags appear
to have been expanded (to foo0, quantity0, and a bunch of bars,
respectively).  Replacing these tags, and deleting the fluff that resulted
from parsing them, appears to have fixed the problem.

I have to wonder how it happened, though.  This doesn't really look like
anything people would be boneheaded enough to do, especially since the only
other person working on this site hasn't touched the cart pages, and is
brighter than that anyway...  :)


More information about the interchange-users mailing list