[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] RE: order route
Hello, I have done this trouble, so for others
the problem is that you can't make space before these codes ;-))
Bye
-----Original Message-----
From: George Schindler [mailto:george@1stomni.com]
Sent: Monday, February 19, 2001 2:46 PM
To: interchange-users@lists.akopia.com
Subject: order route
Hello,
I'm trying to implement order_routing and I use in my checkout.html page
this code
[perl arg=carts interpolate=1]
my $string = <<'EOF';
[item-list][item-code] [item-field dl_type]
[/item-list]
EOF
my @items;
my %route;
@items = grep /\S/, split /\n+/, $string;
for(@items) {
my ($code, $keycode) = split /\t/, $_;
$route{$code} = $keycode;
}
my $cart = $Carts->{'main'};
my $item;
foreach $item ( @{ $Carts->{'main'} } ) {
$item->{mv_order_route} = $route{$item->{'code'}} || undef;
}
return '';
[/perl]
but there is some error in
my $string = <<'EOF';
[item-list][item-code] [item-field dl_type]
[/item-list]
EOF
this code, but error.log has written
pf.1stomni.com CHAV6xam:1stomni.com - [19/February/2001:08:34:43 -0500]
construct /cgi-bin/construct/process.html Safe: Can't find string terminator
"EOF" anywhere before EOF at (eval 875) line 2.
>
>
> my $string = <<'EOF';
> os28004
> os28108
> EOF
I'm not too much good in perl, but I see, that EOF is there :-)), so what is
problem...?
Thanks for some idea.
George
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users