Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Handling charges based on product and destination country in USPS

    Our store uses USPS. We would like to charge different handling cost for some products depending on the destination country. I have the logic to identify the products. To check for the destination country I would like to use the following logic
    if ($order->delivery['country']['id'] == '223' || $this->usps_countries == 'US') {

    I need to know where the handling charge is calculated inside the USPS module so that I can change it? I am using version 1.3.9f

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Handling charges based on product and destination country in USPS

    Look for the cost ... similar to:
    Code:
              $cost = preg_replace('/[^0-9.]/', '',  $cost);
              $methods[] = array('id' => $type,
                                 'title' => $title,
                                 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
    You can use a variable instead of the:
    MODULE_SHIPPING_USPS_HANDLING

    in that code and set that variable to the Handling Fee that you want to use ...
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Handling charges based on product and destination country in USPS

    Thanks for the prompt reply. I will test it out. Starbucks coffee on its way!!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Handling charges based on product and destination country in USPS

    You are most welcome ... and thank you for your support!!
    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: v1.5.5]
    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!

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Handling charges based on product and destination country in USPS

    You might peek at the Beta release of UPS and USPS for methods on having separate Handling based on National and International and see if this gives you a better start on it ...
    http://www.zen-cart.com/forum/showthread.php?t=176606
    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: v1.5.5]
    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!

  6. #6
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Handling charges based on product and destination country in USPS

    Thanks. I will check that out. Meanwhile I need to know the name of the variable that represents the total number of items in the cart. Is there a manual that holds the name of all the variable?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Handling charges based on product and destination country in USPS

    This will give you an array of all the products:
    Code:
    global $cart;
    $_SESSION['cart']->get_products()
    and this would give you the Item Count of the Products x Quantity:
    Code:
    global $cart;
    $_SESSION['cart']->count_contents()
    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: v1.5.5]
    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!

  8. #8
    Join Date
    Mar 2009
    Location
    New York
    Posts
    157
    Plugin Contributions
    0

    Default Re: Handling charges based on product and destination country in USPS

    Thanks.

 

 

Similar Threads

  1. v154 combing shipping and handling charges
    By diptimoy in forum General Questions
    Replies: 5
    Last Post: 22 May 2015, 10:05 PM
  2. USPS handling charges
    By roryg1 in forum Built-in Shipping and Payment Modules
    Replies: 19
    Last Post: 20 Jun 2011, 02:52 PM
  3. Virtual Product with Handling Charges
    By IEMD in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 9 Aug 2009, 02:53 PM
  4. Replies: 4
    Last Post: 16 May 2008, 12:45 AM
  5. Fixed and Percentage based shipping charges.
    By wevans in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 15 May 2007, 03:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR