[ic] 5.3.1 - Out of stock products

Andreas Grau agrau at esquat.com
Sat Oct 22 13:03:44 EDT 2005


Mike Heins wrote:
> Quoting Andreas Grau (agrau at esquat.com):
> 
>>Out of stock items can be preordered, ie. put into the cart using a 
>>quantity of zero (enforced). Zero quantity items are, however, 
>>completely removed from the cart later, leaving no trace of preordered 
>>items.
>>
>>I am tempted to suggest that there should be no automatic removal for 
>>zero quantities, but only for qty < 0. This would leave it open to the 
>>catalog to mark and handle preorders.
>>
>>lib/Vend/Cart.pm may introduce a pack()-sub to kick zero quantities out 
>>of the cart if needed. And a catalog.cfg compatibility flag may change 
>>toss_cart() to old behaviour as well.
> 
> 
> It would seem to make more sense to me to put the items in a separate cart
> with a non-zero quantity. After all, you don't order zero of something...
> 

This is the beauty of Perl and Interchange: there's always one more way 
to do it.

It's the 5.3.1 standard demo who puts a zero quantity on preorder into 
the cart only to kick it out later on. And yes, I know it's just a demo 
... or should I say, it's *the* demo; in which case this might be 
something to fix.

Personally, I think it would be rather elegant to deal with one cart 
only, and toggle a defined functionality on the quantity field, rather 
than juggling with carts.


More information about the interchange-users mailing list