[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Tough problem: seems I loose modifiers in receipt.html
- Subject: [ic] Tough problem: seems I loose modifiers in receipt.html
- From: interchange-users@interchange.redhat.com (Ubi)
- Date: Mon May 20 10:54:01 2002
- In-reply-to: <200205201357.g4KDv1a16532@interchange.redhat.com>
Dear all,
I'm struggling against a very hard problem with Interchange (4.8.3,
4.8.5). I've been using Minivend since version 3 for a number of sites, so
my pages and processes are rather old and have been updated every time, but
are a bit out of the standard route, yet thay've always worked well.
Now, I'm using some custom tags to calculate the prices of items because
I could never get satisfactory results from the standard ones, and I also
use them in pages basket.html, checkout.html, receipt.html.
The problem is that, when it comes to page receipt.html, Interchange
seems to have forgotten about item modifiers ( [item-modifier formats]
does not work too, and returns empty values) and my calculation of prices,
done via proprietary tag mix-sale-off
[mix-sale-off number="[nitems]" prodformat="[item-modifier formats]" ]
always returns "30".
Is it this an Interchange problem, or I am doing something nasty here???
--- THIS IS THE TAG, QUITE TRIVIAL... ---
UserTag mix-sale-off Interpolate
UserTag mix-sale-off Order number prodformat
UserTag mix-sale-off Routine <<EOR
sub {
my $nitems = shift;
my $prodformat = shift;
my $perc_mod = 1;
my $curr_prc = 30;
if ($prodformat eq "s1600x1200") { $curr_prc = 9 };
if ($prodformat eq "s1024x768") { $curr_prc = 4 };
if ($prodformat eq "s800x600") { $curr_prc = 3 };
if ($nitems == 2) { $perc_mod = .95 };
if (($nitems > 2) && ($nitems < 5)) { $perc_mod = .90 };
if (($nitems > 5) && ($nitems < 10)) { $perc_mod = .85 };
if ($nitems > 10) { $perc_mod = .80 };
$curr_prc = $curr_prc * $perc_mod;
return $curr_prc;
}
EOR