Results 1 to 9 of 9
  1. #1
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default UPS Module - Free ground but charge for express?

    Over years of experience, the UPS module seems to work the best overall with Google Wallet and PayPal, etc. Using just the free shipping option in the edit product page throws up an invalid argument error on PayPal orders. Is there a way to offer free ground shipping and only use the UPS rates for 2nd day and next day?

  2. #2
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: UPS Module - Free ground but charge for express?

    PS: I know that invalid argument error was probably resolved in newer versions. But still was wondering if possible to offer free ground within the UPS module somehow. Thanks!

  3. #3
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: UPS Module - Free ground but charge for express?

    Since it doesn't look like there is a way to hack the UPS module itself to output $0.00 for Ground (if there is a way please let me know), so as an alternative I enabled the free option and renamed it to UPS Ground. Then changed the UPS to only display prices for 2nd Day and Next Day.

    BUT now it always shows the free shipping before the customer puts their zip code in for a quote. This isn't ideal because they will think there is only one option and not know they can upgrade shipping. How to hide the free quote until they put a zip code like the other modules?

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

    Default Re: UPS Module - Free ground but charge for express?

    You can customize the UPS shipping module around line 189 with the code in RED:
    Code:
            $cost = preg_replace('/[^0-9.]/', '',  $cost);
    // bof: Set Ground to 0.00
            if ($type == 'GND') {
              $cost = 0.00;
            }
    // eof: Set Ground to 0.00
            $methods[] = array('id' => $type,
                               'title' => $this->types[$type],
                               'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_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!

  5. #5
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: UPS Module - Free ground but charge for express?

    Quote Originally Posted by Ajeh View Post
    You can customize the UPS shipping module around line 189 with the code in RED:
    Code:
            $cost = preg_replace('/[^0-9.]/', '',  $cost);
    // bof: Set Ground to 0.00
            if ($type == 'GND') {
              $cost = 0.00;
            }
    // eof: Set Ground to 0.00
            $methods[] = array('id' => $type,
                               'title' => $this->types[$type],
                               'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) );
    Ajeh you never fail to come through with all the answers. Thank you!!!!!!!

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

    Default Re: UPS Module - Free ground but charge for express?

    You are most welcome ... thanks for the update that this works for you on the Free Ground for UPS ...
    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!

  7. #7
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: UPS Module - Free ground but charge for express?

    It definitely seems to work. Mind you, it's an old version, but working nonetheless.

    It was line 172 and had the following code:
    PHP Code:
            list($type$cost) = each($upsQuote[$i]);
            
    // BOF: UPS USPS
            
    if ($type=='STD') {
              if (
    $std_rcd) continue;
              else 
    $std_rcd true;
            }
            if (!
    in_array($type$allowed_methods)) continue; 
    Changed to this as you said:
    PHP Code:
            list($type$cost) = each($upsQuote[$i]);
            
    // BOF: UPS USPS
            
    if ($type == 'GND') {
              
    $cost 0.00;
            }
            if (!
    in_array($type$allowed_methods)) continue; 
    When adding a handling fee of say $5.00 only the handling fee is charged. I supposed it would be extra complicated to remove the handling fee as well.

  8. #8
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: UPS Module - Free ground but charge for express?

    Forgot to add that I hope it's ok to make the edits I made.

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

    Default Re: UPS Module - Free ground but charge for express?

    To also manage the handling, then try this code:
    Code:
    // bof: Set Ground to 0.00 and Handling to ground
            if ($type == 'GND') {
              $cost = 0.00;
            }
            $methods[] = array('id' => $type,
                               'title' => $this->types[$type],
                               'cost' => ($cost * $shipping_num_boxes) + ($type == 'GND' ? 0.00 : (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING)) );
    // eof: Set Ground to 0.00 and Handling to ground
    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!

 

 

Similar Threads

  1. v154 Free Ship over $50 lower 48+DC, remove UPS ground $ option, show as free.
    By Patrick Vincent in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 6 Dec 2015, 03:39 PM
  2. Free Ground Shipping - Charge for Express Shipping
    By leevil123 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 13 Feb 2010, 12:36 AM
  3. Free UK shipping but charge for Eu and Us
    By mediathing in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 27 Sep 2008, 07:55 AM
  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

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