Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41
  1. #1
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Assign maximum order weight for UPS

    I need to hide UPS in the checkout whenever total order weight exceeds 800 pounds. (I already have customized shipping modules already in place for orders whose total weight exceeds 800, but are hidden when total weight < 800.)

    So before I start hacking, I thought I'd ask if anyone else has already customized their UPS module in similar fashion. If it works with ZC 1.3.7 and the price isn't too steep, I would probably purchase the file modifications.

    The url is ShedKitStore.com, for those who want to see what I'm talking about. It's a working store, so if you test the shipping methods, please include the word TEST in your name when setting up a customer account.

    Thanks,
    Sean

  2. #2
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    I've been trying all afternoon to hardwire a conditional statement into ups.php that will trigger the UPS-can't-quote-shipping error if $shipping_weight >= 800 -- but so far no luck.

    Can anyone familiar with the UPS module tell me which line you would modify?

    Sean

  3. #3
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    I haven't given up yet. In my latest attempt (doesn't work; can anyone tell me why?) I replaced
    PHP Code:
     if ($this->tax_class 0)  {
            
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class$order->delivery['country']['id'], $order->delivery['zone_id']);
          }
        } else {
          
    $this->quotes = array('module' => $this->title,
                                
    'error' => 'UPS cannot quote a shipping cost for this order. Choose another shipping method, or contact the ShedKitStore if no other shipping method is displayed.');
        } 
    with this:
    PHP Code:
          if ($ups_shipping_weight >= 800)  {
          
    $this->quotes = array('module' => $this->title,
                                
    'error' => 'UPS cannot quote a shipping cost for this order. Choose another shipping method, or contact the ShedKitStore if no other shipping method is displayed.');
        }
          
          elseif (
    $this->tax_class 0)  {
            
    $this->quotes['tax'] = zen_get_tax_rate($this->tax_class$order->delivery['country']['id'], $order->delivery['zone_id']);
          }
        } else {
          
    $this->quotes = array('module' => $this->title,
                                
    'error' => 'UPS cannot quote a shipping cost for this order. Choose another shipping method, or contact the ShedKitStore if no other shipping method is displayed.');
        } 

  4. #4
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    Yet another failed attempt. Replaced
    PHP Code:
        if (empty($returnval)) $returnval $errorret;

        return 
    $returnval
    with
    PHP Code:
        if ( (empty($returnval)) || ($shipping_weight >= 800) ) $returnval $errorret;

        return 
    $returnval
    I can't afford to waste any more time on this. Does anyone have a clue what I'm missing?

    A little desperate,
    Sean

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

    Default Re: Assign maximum order weight for UPS

    This is not the most elquent method ... and should be fully tested ...

    Find line 185:
    PHP Code:
          $this->quotes['methods'] = $methods
    Replace with:
    PHP Code:
        if ($ups_shipping_weight >= 800) {
        
    // no ups
        
    } else {
          
    $this->quotes['methods'] = $methods;
        } 
    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
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    Thanks Linda. Doesn't work yet though. I still have a UPS quote when total order weight is over 800 lbs. Is $ups_shipping_weight the combined weight of the order (all packages) or just one package?

    I have maximum package weight set at 70 lbs in Admin/Shipping -- dunno if that's relevant or not.
    Quote Originally Posted by Ajeh View Post
    This is not the most elquent method ... and should be fully tested ...

    Find line 185:
    PHP Code:
          $this->quotes['methods'] = $methods
    Replace with:
    PHP Code:
        if ($ups_shipping_weight >= 800) {
        
    // no ups
        
    } else {
          
    $this->quotes['methods'] = $methods;
        } 

  7. #7
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    I just triple-checked to make sure the modified file is in place and the modification at 185 is the only deviation from the original. I really need to get better acquainted with PHP so I can answer a few of these questions for myself.

    Is it possible there is something missing in the first half of that replacement code?

    Sean <--( clueless )

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

    Default Re: Assign maximum order weight for UPS

    Fussy fussy fussy ...

    Add a blank Line a line 90 and put in this code instead:
    PHP Code:
        if (IS_ADMIN_FLAG === false && $_SESSION['cart']->weight 800$this->enabled false
    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!

  9. #9
    Join Date
    Aug 2005
    Location
    Cincinnati
    Posts
    334
    Plugin Contributions
    0

    Default Re: Assign maximum order weight for UPS

    Thanks Linda -- before I post, did you mean IS_ADMIN_FLAG === false or IS_ADMIN_FLAG == false? I'll assume it's the latter & try == first -- I'll post a reply in a few minutes.

    Sean

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

    Default Re: Assign maximum order weight for UPS

    I really mean what I wrote ...
    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!

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. v151 Tare Weight / Maximum Package Weight Functionality Change Help
    By jbible in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 17 Jan 2013, 07:17 PM
  2. Maximum weight for flat rate
    By mahlerosa in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 25 Jan 2012, 07:41 AM
  3. Maximum Package Weight You Will Ship - Maximum?
    By WellCool in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 25 Nov 2010, 04:00 PM
  4. Item weight is more than maximum supported weight error
    By jumphotink in forum Addon Payment Modules
    Replies: 0
    Last Post: 18 Mar 2009, 04:15 PM
  5. Block order when maximum weight is reached
    By bazfr in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 2 Nov 2008, 08:22 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