Forums / Built-in Shipping and Payment Modules / Extra Shipping Charge to a Specific City?

Extra Shipping Charge to a Specific City?

Views: 908

Results 1 to 3 of 3
17 Sep 2013, 9:21 PM
#1
jorger avatar

jorger

New Zenner

Join Date:
Aug 2010
Posts:
53
Plugin Contributions:
0

Extra Shipping Charge to a Specific City?

Hi,

I'd like to charge an extra $50 to ship and order to a specific city and I'm using perweightunit. What add-on should I use or what should I do?

Thanks in advance.

17 Sep 2013, 11:21 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Extra Shipping Charge to a Specific City?

You will have to setup a zone for this city/state and clone the "perweightunit" module and set it for this zone

Zen-Venom Get Bitten

17 Sep 2013, 11:31 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Extra Shipping Charge to a Specific City?

I have not tested this, but I believe you could customize the shipping module for:

/includes/modules/shipping/perweightunit.php

with the code in RED:

  function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes;

    $total_weight_units = $shipping_weight;
    
[B]    if (strtoupper($order->delivery['city']) == 'NEW YORK') {
      $chk_extra_shipping = 50.00;
    } else {
      $chk_extra_shipping = 0.00;
    }
[/B]    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY,
                                                   'cost' => [B]$chk_extra_shipping + [/B]MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) +
                                                   (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) ) ));

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!