[ic] Something for the whislist
Lars Tode
lars.tode at bpanet.de
Wed Jan 9 04:58:55 EST 2008
Hi Interchange Developers,
happy new year to everyone and a new idea in the new year ;-)
Since the customers whishes to their custom shops are endless,
especially the total_cost or discount calculation, I got the idea for a
smal modification of Vend::Interpolate::total_cost
There idea is, to configure some Subs (1, 2 or 3) in the catalog.cfg
that are included the total_cost calculation.
--- Vend::Interpolate ---
sub total_cost {
...
my $shipping = 0;
$shipping += tag_shipping()
if $::Values->{mv_shipmode};
... include additional custom function for shipping ...
$shipping += tag_handling()
if $::Values->{mv_handling};
$total += subtotal();
... include additional custom function ...
$total += $shipping;
... include additional custom function ...
$total += salestax()
unless $Vend::Cfg->{TaxInclusive};
...
}
Example:
The customer would like to have a discount, that should not influnce the
shipping calculation.
The developer could add his custom function for the discount in the
calatlog.cfg and set a new catalog directive:
TotalCalcBeforeSalestax my_discount
or
TotalCalcBeforeHandling my_discount
What did yout think about it?
Regardes,
Lars
More information about the interchange-users
mailing list