[ic] Trouble with repeating special page: interact

Jeff Carnahan interchange-users@lists.akopia.com
Wed Jun 27 01:31:00 2001


} Hmm. No suggestions for 4.6.x other than to trace the code and find
} where it is calling interaction_error() -- I think it needs to return
} where it doesn't now. It also needs to return a false value so that you
} don't display a page.
}

Thanks for the reply Mike, it seems update_quantity() in interchange.pl is
calling interaction_error() in this case (in fact, it calls
interaction_error() in all cases where it determines something isn't as it
should be), but its caller (in my case, the  refresh sub on line #846) calls
interaction_error() again when it finds update_quantity() didn't work.

Because update_quantity() seems to call interaction_error() where
appropriate, I don't think callers should bother calling interaction_error()
again to report on update_quantity(). interaction_error("quantities") isn't
very informative and isn't necessary if update_quantity() takes care of all
error cases.

Perhaps lines similar to:

update_quantity() or return interaction_error("quantities");

can be replaced by:

update_quantity() or return;

I've tested this on 4.6.5 (at least on the refresh sub) and it appears to
work as desired. I haven't looked at the relevant sections in 4.7.x, so I
don't know if this is applicable to future releases.

} We are not putting maintenance effort on anything but show-stoppers on
} the 4.6.5 tree at this point, so it is unlikely to be fixed there. 4.7.x
} takes the pragmatic approach of just stripping the non-numerics.

This doesn't seem to be working properly. (I'm assuming the Demo store on
developer.akopia.com is running 4.7.x).

If I enter "1a" as the quantity for a ladder:
http://demo.akopia.com/cgi-bin/ic1/os29000.html

and add it to my cart, my cart indicates that I now have "1a" ladders ready
to be purchased. Shouldn't the "a" be stripped here?

Also, I notice that if I update the basket by setting the quantity of an
item to just an alpha, say "a" and hit the recalculate button, the item
disappears. I think it would be better if the item remained in the cart
without any changes to the desired quantity if the user enters an invalid
quantity.

--
Jeff Carnahan - jcarnahan@networq.com