Akopia Akopia Services

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

[mv] Can I use Perl to change shipping-desc??



Title: Can I use Perl to change shipping-desc??

Some help for a perl novice please??

I'm using Mike's UPS User-Tag (thank you Mike, a thousand times over)
to calculate shipping costs per item.

I made a little mod in the code that, if the item weight is greater
that 150lbs, sets the shipping cost to $85.00 per such item (we ship
heavy items via truck).  This works very well, to a point.
Of course, the cost is correct, but the shipping-desc still returns
UPS x. 

Is there a way to set the shipping-desc in the perl code so
that it matches the actual shipping method??

Here is what I changed in the user tag:
This might be a conveluted way of doing this,
but like I said, I'm just learning Perl.
----------
my $cost = 0;
# a cost variable for ltl shipping
my $ltl_cost = 0;
        for(@queue) {
# if the weight is ups shipable, get the cost from the table
              if ($_ < 150) {
                      $cost += Vend::Interpolate::tag_ups(

                            $mode,
                                    $opt->{zip},
                              $_,
                                $opt->{zone},
                                );
# otherwise, add a fixed cost the ltl shipping cost
              }else{
                  $ltl_cost += 85;
              }  
        }    
# if ltl shipping cost is more than zero, the whole order goes via truck
# set the return cost to ltl shipping cost
        if ($ltl_cost > 0) {
              $cost = $ltl_cost;
        }    
return $cost;
---------
TIA
Scott


Search for: Match: Format: Sort by: