Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default max weight for usps?

    can i set a maximum weight for USPS? I have items that i would like to offer USPS under 5lbs but anyting above that for the customer not to have to option of USPS during checkout... thanks

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

    Default Re: max weight for usps?

    You are best customizing the USPS shipping module itself to only display when the weight > 5 ...

    Edit the file:
    /includes/modules/shipping/usps.php

    and above this code:
    PHP Code:
        $this->types = array('EXPRESS' => 'Express Mail',
            
    'FIRST CLASS' => 'First-Class Mail',
            
    'PRIORITY' => 'Priority Mail',
            
    'PARCEL' => 'Parcel Post',
            
    'MEDIA' => 'Media Mail',
            
    'BPM' => 'Bound Printed Material',
            
    'LIBRARY' => 'Library'
            
    ); 
    add this code to make it read:
    PHP Code:
        global $shipping_weight;
        if (
    $shipping_weight 5) {
            
    $this->enabled false;
        }

        
    $this->types = array('EXPRESS' => 'Express Mail',
            
    'FIRST CLASS' => 'First-Class Mail',
            
    'PRIORITY' => 'Priority Mail',
            
    'PARCEL' => 'Parcel Post',
            
    'MEDIA' => 'Media Mail',
            
    'BPM' => 'Bound Printed Material',
            
    'LIBRARY' => 'Library'
            
    ); 
    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!

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

    Default Re: max weight for usps?

    NOTE: that code is for anything above 5 lbs will not see the USPS shipping module ...

    NOTE: there are no overrides for this file so be sure to save the original and the customized file for future reference ...
    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!

  4. #4
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: max weight for usps?

    sorry for getting back so so late, code didn't seem to work

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

    Default Re: max weight for usps?

    Does USPS show at any weight?

    Or, does it show all of the time?

    You did not explain what "doesn't work" means ...
    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!

  6. #6
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: max weight for usps?

    it shows up all the time as a shipping option

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

    Default Re: max weight for usps?

    Have you an URL where we can try this?

    What are your settings in the Configuration ... Shipping/Packaging?
    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!

  8. #8
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: max weight for usps?

    USPS.php new:
    PHP Code:
            $check->MoveNext();
          }

          if (
    $check_flag == false) {
            
    $this->enabled false;
          }
        }

        global 
    $shipping_weight
        if (
    $shipping_weight 5) { 
            
    $this->enabled false
        } 

        
    $this->types = array('EXPRESS' => 'Express Mail'
            
    'FIRST CLASS' => 'First-Class Mail'
            
    'PRIORITY' => 'Priority Mail'
            
    'PARCEL' => 'Parcel Post'
            
    'MEDIA' => 'Media Mail'
            
    'BPM' => 'Bound Printed Material'
            
    'LIBRARY' => 'Library' 
            
    ); 
    shipping and packaging config:
    Enter the Maximum Package Weight you will ship 65
    Package Tare Small to Medium - added percentage:weight 2:0
    Larger packages - added packaging percentage:weight 5:0
    Display Number of Boxes and Weight Status 2
    Order Free Shipping 0 Weight Status 0
    Shipping Estimator Display Settings for Shopping Cart 1
    Display Order Comments on Admin Invoice 2
    Display Order Comments on Admin Packing Slip 2

    thanks for your time!

  9. #9
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: max weight for usps?

    im sorry long day website petland plus .com

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

    Default Re: max weight for usps?

    Try using this instead:
    PHP Code:
        global $total_weight;
        if (
    $total_weight 5) {
            
    $this->enabled false;
        } 
    Does that work better for you?
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 USPS Max Shipping Weight + Exclude International
    By Kenichi in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 13 Jan 2013, 12:26 AM
  2. v139h Max weight restriction code for USPS Priority Mail Int Lrg Video box shipping option
    By heteromorphic in forum Addon Shipping Modules
    Replies: 9
    Last Post: 8 Sep 2012, 01:05 AM
  3. USPS max weight limit
    By buildingblocks in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 15 Sep 2011, 05:01 PM
  4. Max weight for first class mail international
    By riosouza in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 17 Feb 2010, 06:49 AM
  5. Setting max weight for USPS
    By ronlee67 in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 20 Oct 2009, 03:51 AM

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