Results 1 to 10 of 447

Hybrid View

  1. #1

    Default Re: USPS Shipping Module [Support Thread]

    Not related to the problem but is there a way to limit the usps First Class package based on order value?
    Case Badges by Techiant

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

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by Techiant View Post
    Not related to the problem but is there a way to limit the usps First Class package based on order value?
    You could make a site-specific modification to the 'extra' element provided in the USPS shipping module's zip-file. Look at /extras/includes/classes/observers/auto.usps_overrides.php and make the modifications you're 'looking for'.

  3. #3
    Join Date
    Sep 2012
    Location
    Upstate South Carolina
    Posts
    106
    Plugin Contributions
    2

    Default Re: USPS Shipping Module [Support Thread]

    We limit USPS shipping to orders less than $300, like this:

    /includes/modules/shipping/usps.php - about line 368

    Code:
            
    
            global $template, $current_page_base;
            // CUSTOMIZED CONDITIONS GO HERE
            // Optionally add additional code here to change $this->enabled to false based on whatever custom rules you require.
            // -----
    
    
            //orders over 300 may not use usps
            if ($order->info['subtotal'] >= 300){
            
                $this->enabled = false;
            
            }

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: USPS Shipping Module [Support Thread]

    @ChuckPhillips it's easy to change the $300 from a hardcoded number to a value in your Admin's Configuration screens. See

    https://docs.zen-cart.com/dev/plugins/adding_config/
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: USPS Shipping Module [Support Thread]

    This is super rare but I have seen logs from K11d when $uspsQuote['Package'] is not set on line 539.

    --> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/CUST/public_html/includes/modules/shipping/usps.php on line 539.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Apr 2019
    Posts
    345
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by swguy View Post
    This is super rare but I have seen logs from K11d when $uspsQuote['Package'] is not set on line 539.

    --> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/CUST/public_html/includes/modules/shipping/usps.php on line 539.
    Hi @swguy, I received the exact same warning last week. It might be due to the USPS API glitch?

    I changed the nearby line

    if ($this->is_us_shipment) {

    To the following line

    if ($this->is_us_shipment && $uspsQuote['Package']) {

    And it seems working without generating new logs.

    In the past, I only received warning regarding un-countable $uspsQuote['Package']['Service'] (for intl quote), not un-countable $uspsQuote['Package'] (for US domestic quote).

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: USPS Shipping Module [Support Thread]

    > It might be due to the USPS API glitch?
    Certainly could be. Let's sit tight until it starts happening with regularity.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Mar 2018
    Location
    atlanta
    Posts
    10
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    usps 1st class won't show? i am using PHP version 7.4. and usps version is 2022-08-07 K11e.

    I selected domestic first class letter, first class package retail, and priority mail, but only priority mail shows.
    my product weight unit is oz. i tried 3oz, 9oz,.. etc but first class never show.

    i registered and got use ID for the API, but i don't see anywhere to enter anything else. so the user ID (which looks something like 008XPRAV6385) is the only thing i've entered into the settings. i have entered my site URL for registration. I have not contacted USPS for permission like i've read somewhere. i just need to get the shipping cost. so i suppose i don't need to?

    i've changed Tare from 0:3 to 10:0 and nothing changed.
    i've changed Minimum Length to 0 from the default 8.625, and nothing changed.
    i've changed 'Enable USPS First-Class filter' to false, and nothing changed.

    this is my site: https://xtrava.us

    btw, also if i use flat rate shipping on 1 item, then order with multiple products will all have the same flat rate. how do i change that?

    thanks

 

 

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