Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Posts
    2
    Plugin Contributions
    0

    xhtml problem Subtracting UPS Ground cost from other UPS methods

    Hi all,

    Here's the scenario. Our online store offers free UPS Ground shipping, although the customer is able to pay for expedited UPS shipping if they want to. But since UPS Ground is free (via the free shipping module), I would like to deduct the cost of ground shipping from the expedited methods. Why give the customer free ground shipping but then make them pay full price for expedited UPS shipping? I want the expedited methods to be discounted at the rate of whatever ground shipping costs. For example, right now it might look like:

    UPS (Next Day Air Early AM) $122.25
    UPS (Next Day Air) $91.25
    UPS (Next Day Air Saver) $81.85
    UPS (2nd Day Air) $52.60
    UPS (3 Day Select) $34.75
    UPS (Ground) $14.82

    However, I want it to show:

    UPS (Next Day Air Early AM) $107.4
    UPS (Next Day Air) $76.43
    UPS (Next Day Air Saver) $67.03
    UPS (2nd Day Air) $37.78
    UPS (3 Day Select) $19.93
    UPS (Ground) $0.00

    This would also allow me to abandon the free shipping module... Not a huge deal, but it would be nice to consolidate everything down to one shipping chart/table. It would also help to avoid customers from accidentally paying for ground shipping instead of selecting the free option (it has happened before, oddly enough). Yes I know I can just remove the UPS Ground option to avoid that, but I also have customers in Alaska and Hawaii who don't get free shipping and must pay for UPS Ground.

    I have been trying to figure out how to do this in the ups.php shipping module file, but I can't get it to come out properly, or even at all. I am guessing this is a pretty simple thing to fix, but my background is in Visual Basic so I'm not quite adept at figuring out PHP coding.

    Thanks for any help!

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

    Default Re: Subtracting UPS Ground cost from other UPS methods

    You need to compute the cost of the Ground shipping from the quote then deduct that from the cost quoted for each method ...

    This will take a little customization of the code but it can be done and can work ...
    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
    May 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Subtracting UPS Ground cost from other UPS methods

    Quote Originally Posted by Ajeh View Post
    You need to compute the cost of the Ground shipping from the quote then deduct that from the cost quoted for each method ...

    This will take a little customization of the code but it can be done and can work ...
    Exactly. I was thinking I could set up a new variable, and assign the cost of UPS Ground to that variable. Then, it would just be a matter of subtracting that variable from the cost... This is where the cost appears to be calculated in ups.php:

    PHP Code:
    if (!in_array($type$allowed_methods)) continue;
            
    // EOF: UPS USPS
            
    $methods[] = array('id' => $type,
                               
    'title' => $this->types[$type] . $show_box_weight,
                               
    'cost' => ($cost MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes); 
    I would just insert that new variable into the equation in order to subtract it from the cost. That part is easy. But I need help creating the new variable and assigning the cost of ground shipping to that variable.

    Any ideas?

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

    Default Re: Subtracting UPS Ground cost from other UPS methods

    I would have to sit down and actually write the code for this ... but it can be done ...

    HINT: you have to process the results from UPS to get the actual ground cost and then processes the results for building the actual quotes ...
    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!

 

 

Similar Threads

  1. Can I sort UPS shipping methods from least to greatest?
    By djdavedawson in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 19 Jan 2016, 10:02 PM
  2. v139h Why is it always charging UPS ground?
    By Metsmanmike in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 3 May 2013, 03:00 PM
  3. Disable UPS Ground for some states?
    By brushwoodnursery in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 19 Nov 2011, 05:48 PM
  4. Free UPS Ground Across Board
    By thirtytwo16 in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 17 May 2007, 01:57 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