Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2011
    Location
    Atlanta, GA The A-Town Down
    Posts
    23
    Plugin Contributions
    0

    help question USPS Flat Rate Option

    I have read everything I can find on USPS flat rate shipping. I have gathered the following information from several different threads. I still cannot quite find a post that tells if/how it can be done.

    I want to enable USPS Priority Flat Rate Shipping for most items. In fact, I think I only have 2 items that will not fit in a flat rate box. (Domestic only for now).

    I went to /includes/modules/shipping/usps.php.

    !. What line do I put it on?
    2. Is this the correct php language?

    global $shipping_weight;
    //PRIORITY MAIL OPTIONS
    if ($key == 'PRIORITY'){
    $this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box

    }
    //PRIORITY MAIL OPTIONS
    if ($key == 'PRIORITY')
    {
    if ($usps_shipping_weight < 1)
    {
    $this->container = 'Sm Flat Rate Box';
    }
    else if ($usps_shipping_weight < 5)
    {
    $this->container = 'Md Flat Rate Box';
    }
    else
    {
    $this->container = 'Lg Flat Rate Box';
    }
    }

    Thanks so much.
    HipDock.com -This is my first site. Version 1.3.9h. LightBox Add-On March 2011. Thanks for your patience and help!

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

    Default Re: USPS Flat Rate Option

    You could try this:
    Code:
              //PRIORITY MAIL OPTIONS
              if ($key == 'PRIORITY'){
    //            $this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box
                switch (true) {
                  case ($this->pounds < 1):
                    $this->container = 'Sm Flat Rate Box';
                    break;
                  case ($this->pounds < 5):
                    $this->container = 'Md Flat Rate Box';
                    break;
                  default:
                    $this->container = 'Lg Flat Rate Box';
                    break;
                }
              }
    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
    Jan 2011
    Location
    Atlanta, GA The A-Town Down
    Posts
    23
    Plugin Contributions
    0

    Default Re: USPS Flat Rate Option

    Thanks for the code. Where exactly do I put it? Sorry, trying to learn. I have 2 files.
    /includes/modules/shipping/usps.php and
    /includes/modules/shipping/flat.php
    I not only need to know which file to add it to but what line to enter it.
    Thank you so much!
    HipDock.com -This is my first site. Version 1.3.9h. LightBox Add-On March 2011. Thanks for your patience and help!

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

    Default Re: USPS Flat Rate Option

    The current USPS code reads:
    Code:
              //PRIORITY MAIL OPTIONS
              if ($key == 'PRIORITY'){
                $this->container = ''; // Blank, Flate Rate Envelope, or Flat Rate Box // Sm Flat Rate Box, Md Flat Rate Box and Lg Flat Rate Box
    
              }
    So you would need to change that to match your needs with the code posted ...

    The Flat Rate flat shipping module is for when you want to charge 1 price regardless of the number of Products or Weight of the Products ...

    I do not believe you want to use the Flat Rate flat shipping module at all and you should go to the Modules ... Shipping ... and click on it and click REMOVE ...
    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
    Jan 2011
    Location
    Atlanta, GA The A-Town Down
    Posts
    23
    Plugin Contributions
    0

    Default Re: USPS Flat Rate Option

    That's right. I remember that now. Okay. I still need to use the small, med, and large USPS flat rate shipping boxes. Where do i enter the code within the USPS.php? Thank you.
    HipDock.com -This is my first site. Version 1.3.9h. LightBox Add-On March 2011. Thanks for your patience and help!

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

    Default Re: USPS Flat Rate Option

    I already posted the old code and the new code ... you replace the old code with the new code ...

    Then, set the weights for the new code if 1 and 5 are not the weights you want to use to break up which container should be used for the different weights ...
    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!

  7. #7
    Join Date
    Jan 2011
    Location
    Atlanta, GA The A-Town Down
    Posts
    23
    Plugin Contributions
    0

    Default Re: USPS Flat Rate Option

    Got it! Thank you. Applause Applause.
    HipDock.com -This is my first site. Version 1.3.9h. LightBox Add-On March 2011. Thanks for your patience and help!

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

    Default Re: USPS Flat Rate Option

    Thanks for the update that this is now working 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: 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. v139h USPS Flat Rate Boxes Problem
    By peppertrader in forum Addon Shipping Modules
    Replies: 1
    Last Post: 7 Apr 2012, 06:40 PM
  2. USPS Flat Rate not an option
    By ktfmissions in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 12 Mar 2011, 09:26 PM
  3. USPS Flat Rate Boxes
    By noderaser in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 6 Sep 2010, 09:25 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