Results 1 to 10 of 447

Hybrid View

  1. #1
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    618
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by tedjmaines View Post
    Thank you Helene. I did modifications as you suggested and it works the reverse that I need. I need only master category 15 (books) to use Media Mail. What I have is category 15 (books) excludes the Media Mail and all other non-books show media mail. So my logic is backwards. I tried changing true and false but does not seem to work. Must have made a logic error.
    I see that I phrased something backwards. What you need to do is not substitute your category number for books, but to add all the category numbers except the one for books. Changing true to false will just prevent the code from being executed at all.

    For example, this shows two categories excluded from Small Flat Rate box shipping. That was my original requirement. Now I have four categories excluded, plus a couple of product numbers that are in permitted categories but are still not appropriate to ship in a Small Flat Rate box. I also have exclusions in otherwise permissible categories based on the quantity of items ordered (two would be okay in a Small Flat Rate box, three would not be okay, for example).

    If you have a very large number of categories, so many that adding a conditional statement for every one of them except books wouldn't be feasible, you might want to look at reorganizing your categories so you have broader ones that include more kinds of products. For example, I had one category that included all the products from a particular vendor. Then he started producing a product that fell more logically into another category I already had set up. Except that it required me to add many more conditional statements to keep that new product from being shipped in certain size boxes, even though everything else in that category could be shipped in those boxes. I eventually moved the new product to the category that included all the others from that vendor, and was able to simplify the shipping code considerably.
    Last edited by HeleneWallis; 31 May 2021 at 01:17 PM.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: USPS Shipping Module [Support Thread]

    If you're using USPS K11a, then including a modified version of the autoloaded observer example (present in the zip-files /extras sub-directory) should disable media-mail unless all products in the cart are from category 15:
    Code:
                case 'NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE':
                    // -----
                    // Disallow "Media Mail" unless all products in the cart have their master_categories_id within category 15.
                    //
                    if (stripos($p1, 'Media Mail') !== false) {
                        $chk_media = 0;
    
                        $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id', '15');
                        if ($chk_media == $_SESSION['cart']->count_contents()) {
                            $p2 = false;
                        }
                    }
                    break;
    If that books category contains sub-categories, you'll need to add additional lines to check for the presence of each of the sub-categories.

  3. #3
    Join Date
    Jun 2016
    Location
    Suffolk VA
    Posts
    618
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by lat9 View Post
    If you're using USPS K11a, then including a modified version of the autoloaded observer example (present in the zip-files /extras sub-directory) should disable media-mail unless all products in the cart are from category 15:
    Code:
                case 'NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE':
                    // -----
                    // Disallow "Media Mail" unless all products in the cart have their master_categories_id within category 15.
                    //
                    if (stripos($p1, 'Media Mail') !== false) {
                        $chk_media = 0;
    
                        $chk_media += $_SESSION['cart']->in_cart_check('master_categories_id', '15');
                        if ($chk_media == $_SESSION['cart']->count_contents()) {
                            $p2 = false;
                        }
                    }
                    break;
    If that books category contains sub-categories, you'll need to add additional lines to check for the presence of each of the sub-categories.
    Thanks, I can use that too.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,700
    Plugin Contributions
    11

    Default Re: USPS Shipping Module [Support Thread]

    Looks like the servers are down.

    https://downdetector.com/status/usps/
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  5. #5
    Join Date
    Mar 2005
    Location
    Earth
    Posts
    92
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by dbltoe View Post
    looks like the servers are down.

    https://downdetector.com/status/usps/
    free shipping today!

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,700
    Plugin Contributions
    11

    Default Re: USPS Shipping Module [Support Thread]

    Finally got through to USPS. They acknowledge problems since around 1300 CDT and have no estimate as to when the service will be back on line.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  7. #7
    Join Date
    Nov 2017
    Location
    United States
    Posts
    63
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by dbltoe View Post
    Finally got through to USPS. They acknowledge problems since around 1300 CDT and have no estimate as to when the service will be back on line.
    I'm also currently down thanks to that since early this afternoon. This is one of my busiest weeks of the year the week before the last holiday too. Hope they get something figured out and quick! The USPS sites calculator is working, just not the one I use (most current version).

  8. #8
    Join Date
    Nov 2017
    Location
    United States
    Posts
    63
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by dbltoe View Post
    Finally got through to USPS. They acknowledge problems since around 1300 CDT and have no estimate as to when the service will be back on line.
    Just an FYI I figured out what was wrong. Apparently I didn't have the most current USPS Plug In so downloaded the 8/7 one and installed and now my site's working again. Must have been some small issue that caused the previous version to quit working earlier today.

  9. #9
    Join Date
    Nov 2011
    Posts
    33
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Reading the "Read Me" portion of the USPS dowload. It states:
    - /includes/modules/shipping/usps.php
    - /includes/languages/english/modules/shipping/usps.php
    - /includes/templates/template_default/images/icons/shipping_usps.gif
    This does not match what my file structure looks like. I do not know where to put the files?
    AM I supposed to upload the whole folder or just the USPS.php?
    Thnx!

 

 

Similar Threads

  1. Optional Shipping Insurance Module [Support Thread]
    By jettrue in forum Addon Shipping Modules
    Replies: 415
    Last Post: 6 Jul 2026, 02:45 PM
  2. MultiSite Module Support Thread
    By Gerome in forum All Other Contributions/Addons
    Replies: 2246
    Last Post: 29 Dec 2025, 10:13 AM
  3. Replies: 29
    Last Post: 24 Sep 2014, 09:59 PM
  4. Replies: 335
    Last Post: 1 Aug 2013, 08:54 PM
  5. PC Configurator Module [Support Thread]
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 254
    Last Post: 22 Aug 2012, 03:52 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