[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Serious! Confirmed that item modifiers are lost moving toreceipt.html
Thanks, but did not solve... Also using $Items was helpless, sigh!
If there are no further suggestions, I'm giving up and set up a different
code for each variation of the same product, as I need item modifiers to
calculate pricing.
Also this routine is OK in checkout.html yet displays nothing for formats
in receipt.html
UserTag debucart Interpolate
UserTag debucart Order number
UserTag debucart Routine <<EOR
sub {
my $currprod = 1;
my $item;
my $cart = $::Carts->{main};
my $fulldata = "<br>-- Basket content, debug --<br>";
foreach $item (@$cart) {
$fulldata = $fulldata . $currprod . ". ";
$fulldata = $fulldata . $item->{'code'} . " ";
$fulldata = $fulldata . $item->{'formats'} . " ";
$fulldata = $fulldata . "<br>";
$currprod++;
}
return $fulldata;
}
EOR
---
On Thu, 23 May 2002, Kevin Walsh wrote:
>
> As all custom pricing routines that I have written failed only in
> receipt.html (but not in checkout.html nor any other page), apparently
> because the $Cart variable gets corrupted. Now, I've written this silly
> tag that returns the item-modifier for the last object:
>
> # Ubi: just for test, TESTED AND WORKS IN ord/checkout.html but
> # not in receipt.html
>
> UserTag test-mod Routine <<EOR
> sub {
> my $cart = $Vend::Session->{carts}{main};
> my $item;
> my $prod_format;
> foreach $item (@$cart) { $prod_format = $item->{formats}; }
> return $prod_format;
> }
> EOR
>
Try using $::Carts->{main} in your tag, instead of
$Vend::Session->{carts}{main}.