[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: [mv] Shipping Cost On Each Item
****** message to minivend-users from jojo@buchonline.net ******
On 12 Apr, Christopher Thompson wrote:
> ****** message to minivend-users from "Christopher Thompson" <ct@arborinternet.com> ******
>
> I believe Mike Heins posted a UserTag template a while back to use with
> shipping, or perhaps it was a GlobalSub. I think you would write your own
> routine and then, in your shipping.asc file, specify to use that routine
> and a field of your choice to calculate shipping. Perhaps Mike might be
> kind enough to post the template and instructions again on how to do this.
>
Or you use this codes for example (not tested yet):
######## Summary of shipping cost of each items
#
#
#
UserTag sumshippingcost Routine <<EOF
sub {
package Vend::Interpolate;
my $sumshipping;
my $a;
my $cart;
$cart = $Vend::Items;
my $item;
my $shippingcost;
my $amount;
foreach my $item (@$cart){
my $item_price = '';
$shippingcost = tag_data('products','shippingcost', $item->{code});
$amount = $item->{quantity};
$a = $shippingcost * $amount;
$sumshipping = $sumshipping + $a;
}
return $sumshipping;
}
EOF
How to use this UserTag? Insert this in you minivend.cfg or catalog.cfg
and insert in you page (for example checkout page) this
[sumshippingcost]
I hope this can helps you!
Regards,
Joachim
--
Hans-Joachim Leidinger
buch online jojo@buchonline.net
Munscheidstr. 14 FAX: +49 209 1671449
45886 Gelsenkirchen FAX: 0209 1671449
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list