[ic] Problems with Custom Shipping after IC. upgrade from 4.8.3
to 5.2.1
Stefan Hornburg
racke at linuxia.de
Sat Nov 26 06:52:12 EST 2005
Alexander Schmitz wrote:
> Hello List.
>
> we are calculating the shipping costs in our custom checkout process
> (multipage) in a plain Perl-tag section. Then we assign the result
> value with [assign interpolate=1 salestax=0 shipping="[scratch
> myshippingcost]"] to [shipping].
Do you really need interpolate=1 ?
>
> This worked well with IC Ver. 4.8.3.
If your report is accurate, that looks like a bug.
>
> We did not set any shipping.asc or default mv_shipping ... Just
> assigned shipping, and total_cost was modified correctly.
>
> After the update to 5.2.1 this stopped working, the total_cost value is
> no longer calculated with the assigned shipping. After searching the
> list I found some hints and added [assign clear=1] and [value
> name=mv_shipmode set=1 hide=1] with the effect that total_cost is
> calculated on this specific page, but loses the correct value in the
> further order process.
>
> I think I can't get the Big Picture when it comes to custom shipping.
> Are there any configuration directives in catalog.cfg that must be set
> to enable custom shipping assignment?
My preferred way for custom shippings is a [calc_shipping] usertag, e.g.
UserTag calc_shipping Order name
UserTag calc_shipping Routine <<EOR
sub {
my ($name) = @_;
my ($cost);
if ($Scratch->{"company::country"} eq 'Deutschland') {
$cost = $Variable->{VERSANDKOSTEN_INLAND};
} else {
$cost = $Variable->{VERSANDKOSTEN_AUSLAND};
}
return $cost;
}
EOR
products/shipping.asc:
default: Standard
crit quantity
min 0
max 10000000
free 1
cost f [calc_shipping]
catalog.cfg:
ValuesDefault mv_shipmode default
That is IMHO a better way to integrate custom shipping.
Bye
Racke
More information about the interchange-users
mailing list