[ic] stopping customer from ordering more than in stock

Jerry jerry@digitalfm.com
Tue, 12 Dec 2000 07:53:35 -0500


This is how I deal with it. If they attempt to order more
than there is in stock. It places a note under the description
and changes the quantity to the number in stock. The following
is from my basket.html page You'll find you also need
to do something similar on the checkout page. I also force a
page refresh if someone changes the quantity of any item.
This prevents them from changing a quantity and going
straight to "Place Order" and then having to deal with it in the
order process also, but it would be a good idea to check quantities
there also. Just haven't gotten around to it.

This could probably be a little more elegant, but it works.
Hope it helps.


[item-calc]
my $q = q{[item-data inventory quantity]};
my $s = q{[item-quantity]};
if($q < $s) {
return <<EOF;
<font size=1 face="arial, verdana, helvetica" color="#ff0000">
Sorry, only $q available.
<br></font></TD><TD ALIGN=CENTER>
<INPUT onChange="this.form.submit()" TYPE=text NAME="[quantity-name]"
VALUE=$q SIZE=3>
EOF
}
else {
return <<EOF;
</TD><TD ALIGN=CENTER>
<INPUT onChange="this.form.submit()" TYPE=text NAME="[quantity-name]"
VALUE="[item-quantity]" SIZE=3>
EOF
}
[/item-calc]
</TD>




> -----Original Message-----
> From: interchange-users-admin@minivend.com
> [mailto:interchange-users-admin@minivend.com]On Behalf Of Curt Hauge
> Sent: Monday, December 11, 2000 9:24 PM
> To: interchange-users@minivend.com
> Subject: RE: [ic] stopping customer from ordering more than in stock
>
>
> How about comparing the quantity of the item ordered to the
> quantity in the inventory database per each item before allowing
> checkout to occur?  Can anyone figure a quick perl routine to do
> this at checkout?
>
> Curt
>
>
> -----Original Message-----
> From: interchange-users-admin@minivend.com
> [mailto:interchange-users-admin@minivend.com]On Behalf Of Flo
> Sent: Saturday, December 09, 2000 12:25 PM
> To: interchange-users@minivend.com
> Subject: [ic] stopping customer from ordering more than in stock
>
>
> Hi everybody,
>
> I'm quite new to interchange (4.6), so I'm not sure whether I'm
> asking the
> obvious. Here's my problem: if an item is out of stock, it's displayed as
> such, and nobody can order it. so far, so good. However, if it's still in
> stock, but somebody orders more than the quantity in stock, their
> order also
> seems to go through (e.g. in the standard "construction" sample
> shop). We are
> trying to set up a shop for tickets to comedy events in Austria
> (http://www.kabarett.at), so if we've got 3 tickets left, but
> somebdoy oders
> 5, there's no warning, they get the oder confirmation for all 5,
> and we end
> up with -2 items in the database. Am I missing something, or is
> there no way
> to change that? (Of course I can always limit the maximum to be
> ordered in a
> single order to 10, and always have 9 tickets in reserve, but
> that's quite a
> sub-optimal solution).
>
> Thanks for your help,
>
> Flo
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@www.minivend.com
> http://www.minivend.com/mailman/listinfo/interchange-users
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@www.minivend.com
> http://www.minivend.com/mailman/listinfo/interchange-users
>