[ic] Prevent from ordering more than is in stock

Stefan Hornburg racke at linuxia.de
Tue Jan 27 06:31:09 EST 2004


On Mon, 26 Jan 2004 21:40:16 -0800
"Sanjeev Topiwala" <s_tops at hotmail.com> wrote:

> Hi,
> 
> I'm using IC 5.0 and want to prevent people from ordering more than 
> "in-stock" items. As per the posting
> 
> http://www.icdevgroup.org/pipermail/interchange-users/2002-October/027532.html
> 
> i'm using the configuration setting
> 
>    MaxQuantityField  inventory:quantity
> 
> Adding this configuration works fine, but I cannot capture the warning when 
> this is done. I tried using
> 
> [if warnings]
>   [warnings]
> [/if]
> 
> But it does not print anything. Is there any other way to find out how to 
> print the warning corresponding to this ?

After examining the source code I suppose that there is no warning generated.
You can try the following code for displaying information to your customers:

[calcn]
my $out = '';
for (@$Items) {
	if ($_->{mv_max_over}) {
		$out .= "Item $_->{code} exceeds maximum quantity $_->{mv_max_quantity}<br>";
		delete $_->{mv_max_over};
	}
}
return $out;
[/calcn]

Bye
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list