[ic] interchange error
John Young
john_young at sonic.net
Thu Oct 23 18:25:13 EDT 2003
jlgates at morningstarwebservices.net wrote:
> The errors below happen every time I try to test the check out process to
> see if I am going to be told I am below the minimum order quantity.
>
> - - - [23/October/2003:19:11:51 -0400] - - hammered PID 19511 running 32
> seconds
> - - - [23/October/2003:19:11:57 -0400] - - hammered PID 19517 running 31
> seconds
> - - - [23/October/2003:19:12:33 -0400] - - hammered PID 19520 running 31
> seconds
> - - - [23/October/2003:19:12:40 -0400] - - hammered PID 19524 running 31
> seconds
>
> I read something in the ic archive that says something about a leading or
> trailing " missing. I don't see anything in my cfg files that has this "
> missing.
>
> What files and where are the files that would be causing this error?
>
> If the minimum and batch order control is set up properly at what point in
> the order and checkout process is it supposed to tell the buyer that their
> order is below the minimum order qauntity?
>
> Does any one see anything wrong with the code below?
>
> UserTag batch Routine <<EOR
> sub {
> foreach my $index (0 .. $#$Vend::Items) {
> my $code = $Vend::Items->[$index]{code};
> my $oqty = $Vend::Items->[$index]{quantity};
> my $base = $Vend::Items->[$index]{mv_ib};
> my $nqty = $oqty;
> my $batches = undef;
>
> my $min = Vend::Data::database_field($base, $code, "min_qty", undef);
> my $batch = Vend::Data::database_field($base, $code, "batch_qty", undef);
>
> $batch = 1 if $batch <= 1;
> $min = 1 if $min <= 1;
> $nqty = 0 if $nqty <= $min;
> $nqty = $nqty - $min if $nqty > $min;
>
> $batches = int($nqty / $batch);
> $nqty = $min + $batches * $batch;
>
> my $message = <<EOM;
> <br>
> <p style="font-size: 10px">
> You must order at least $min items.
> </p>
> <p style="font-size: 10px">
> Additional items must be ordered in multiples of $batch.
> </p>
> EOM
>
> $Vend::Items->[$index]{quantity} = $nqty;
> $Vend::Items->[$index]{message} = $message if $oqty != $nqty;
> $Vend::Items->[$index]{message} = "" if $oqty == $nqty;
> }}
> EOR
How about that double right brace second line from the end?
John Young
More information about the interchange-users
mailing list