Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] MV4 Chained Shipping w/ usertag



******    message to minivend-users from Randy Moore <ramoore@axion-it.net>     ******

Hi all,

I'm trying to setup a way to charge 10% over the actual cost of UPS 
shipping for an order.

In the archives, I found a suggestion from Mike H. for using the (mostly 
undocumented) chained shipping method with a usertag to do the actual 
calculations.

Unfortunately, when I try it, MV seems to get stuck in a loop.  Follow up 
messages in the archive report this same problem, and Mike H. suggests a 
fix, but it doesn't work in my case, and their are no further messages in 
that thread (as far as I could find).

I did find a few other examples using chained shipping, but never with 
usertags.

Does anyone know if this should actually work?  Suggestions for alternate 
approaches would be appreciated.

Here is what I'm trying:

 From shipping.asc:
upsg    UPS Ground      weight  0       0       e Nothing to ship!
upsg    UPS Ground      weight  0       150     m [do_ups zip=[value zip] \ 
weight=@@TOTAL@@ mode=Ground adder=0]
upsg    UPS Ground      weight  150     999999  e @@TOTAL@@ lbs too \
heavy for UPS

(wrapped for easy reading in email, not really wrapped in shipping.asc)

 From catalog.cfg:

UserTag do_ups Order mode adder zip weight
UserTag do_ups Routine <<EOR
sub {
         my ($mode, $adder, $zip, $weight) = @_;
         $zip = $::Values->{zip} unless $zip;
         my $ups_cost = Vend::Interpolate::tag_ups($mode, $zip, $weight);
         return '>error' if $ups_cost < 0.01;
         my $cost = $ups_cost;
         # Do your calcs here
         $cost *= 1.1;
         return $cost;
}
EOR

FYI, standard UPS lookups are working fine.

Details:
   Minivend 4.04
   Perl 5.003_03
   RedHat 6.0

Thanks for any help.

Randy Moore
Axion Information Technologies, Inc.

email     ramoore@axion-it.net
phone   301-408-1200
fax        301-445-3947
-
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


Search for: Match: Format: Sort by: