[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Something for the whislist


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

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.