Results 1 to 10 of 447

Hybrid View

  1. #1
    Join Date
    Mar 2021
    Location
    Campbell, Texas USA
    Posts
    13
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Using zen cart v1.5.7C, USPS 2020-09-24 K11. I know this is an old problem but this new module has different code. Problem: Always shows Media Mail option even when not in Media Category (5). Where do I place and what do I place to get only Media Category to show Media Mail in this new module???. Any mixture of non media should not show media mail option. Thanks.

  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 tedjmaines View Post
    Using zen cart v1.5.7C, USPS 2020-09-24 K11. I know this is an old problem but this new module has different code. Problem: Always shows Media Mail option even when not in Media Category (5). Where do I place and what do I place to get only Media Category to show Media Mail in this new module???. Any mixture of non media should not show media mail option. Thanks.
    I don't understand the problem statement.

    What is the "Media Category (5)"? Did you have this working on a previous USPS version? If so, could you point me to a thread where Ajeh identified how to do it?

    If I know "how you did it before", I can point you to "how to do it again".

  3. #3
    Join Date
    Mar 2021
    Location
    Campbell, Texas USA
    Posts
    13
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by lat9 View Post
    I don't understand the problem statement.

    What is the "Media Category (5)"? Did you have this working on a previous USPS version? If so, could you point me to a thread where Ajeh identified how to do it?

    If I know "how you did it before", I can point you to "how to do it again".
    I have never got it working. in previous edition v154 and beyond, we did flat rate. I would like to get this working. I read the other versions post but it does not work for v157c with K11. If someone got it to work in previous versions of USPS maybe they can let you know. The code I read before used a master category number for Media (mine is Master_id = 5) for loop but that did not work on my K11.

  4. #4
    Join Date
    Dec 2017
    Location
    Anderson, IN
    Posts
    44
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    So, we installed the new patch in order to switch the URL's to secrure as directed. Using ZC 1.5.7a and the 2020-09-24 K11 build from USPS. Am I missing a setting somewhere? First Class does not show up as an option even on the lightest shipments, and I'm losing orders based on only priority mail and express mail showing up. I've gone back and checked the USPS module, and really didn't change anything except the handling fee. I don't offer flat rate for anything, so the only options my customers have are First Class Package Service, Priority Mail, Express Mail, First Class International Package, Priority Mail International, and Express Mail International. Here are my settings in the USPS module:
    USPS Version Date
    2020-09-24 K11

    Enable USPS Shipping
    True

    Full Name or Short Name
    Long

    Enter the USPS Web Tools User ID
    XXXXXXXXXXXXX (changed from original for privacy)

    Which server to use
    production

    Quote Sort Order
    Price-LowToHigh

    Handling Fee - US
    2.5

    Handling Fee - International
    3

    Handling Per Order or Per Box
    Order

    Decimal Settings
    3

    Tax Class
    --none--

    Tax Basis
    Shipping

    Shipping Zone
    --none--

    Sort Order
    0

    All Packages are Machinable?
    False

    USPS Options
    --none--

    USPS Domestic Transit Time Calculation Mode
    NEW

    USPS Domestic minimum Length
    8.625

    USPS minimum Width
    5.375

    USPS minimum Height
    1.625

    USPS International minimum Length
    9.50

    USPS minimum Width
    1.0

    USPS minimum Height
    5.50

    Enable USPS First-Class filter for US shipping
    True

    Shipping Methods (Domestic and International)
    0, .21875, 0.00, 0, .8125, 0.00, First-Class Package Service - RetailTM, 0, .8125, 0.00, 0, .9375, 0.00, 0, 70, 0.00, 0, 70, 0.00, Priority MailTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 15, 0.00, 0, 20, 0.00, Priority Mail ExpressTM, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, .21875, 0.00, 0, 4, 0.00, First-Class Package International ServiceTM, 0, 4, 0.00, Priority Mail InternationalRM, 0, 66, 0.00, 0, 4, 0.00, 0, 4, 0.00, 0, 20, 0.00, 0, 20, 0.00, Priority Mail Express InternationalTM, 0, 66, 0.00, 0, 4, 0.00, 0, 70, 0.00, 0, 70, 0.00

    Extra Services (Domestic)
    Certified MailRM, N, USPS TrackingTM Electronic, N, USPS TrackingTM, N, Insurance, N, Priority Mail Express Insurance, N, Priority Mail Insurance, N, Adult Signature Restricted Delivery, N, Adult Signature Required, N, Registered MailTM, N, Collect on Delivery, N, Return Receipt, N, Certificate of Mailing (Form 3665), N, Certificate of Mailing (Form 3817), N, Signature ConfirmationTM Electronic, N, Signature ConfirmationTM, N, Priority Mail Express 1030 AM Delivery, N, Certified MailRM Restricted Delivery, N, Certified MailRM Adult Signature Required, N, Certified MailRM Adult Signature Restricted Delivery, N, Signature ConfirmationTM Restricted Delivery, N, Signature ConfirmationTM Electronic Restricted Delivery, N, Collect on Delivery Restricted Delivery, N, Registered MailTM Restricted Delivery, N, Insurance Restricted Delivery, N, Insurance Restricted Delivery (Priority Mail Express), N, Insurance Restricted Delivery (Priority Mail), N

    Extra Services (International)
    Registered Mail, N, Insurance, N, Return Receipt, N, Electronic USPS Delivery Confirmation International, N, Certificate of Mailing, N

    Retail pricing or Online pricing?
    Online

    Debug Mode
    Off

  5. #5
    Join Date
    Dec 2017
    Location
    Anderson, IN
    Posts
    44
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Never mind. It only had the first class - retail option selected; once I checked the first class - comm option, they started showing up again.

  6. #6
    Join Date
    Mar 2021
    Location
    Campbell, Texas USA
    Posts
    13
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by tedjmaines View Post
    I have never got it working. in previous edition v154 and beyond, we did flat rate. I would like to get this working. I read the other versions post but it does not work for v157c with K11. If someone got it to work in previous versions of USPS maybe they can let you know. The code I read before used a master category number for Media (mine is Master_id = 5) for loop but that did not work on my K11.
    Still have this issue with new K11a on v157c. I put the proper category for books which is shipped Media Parcel Mail in code as instructed. What it is suppose to do is if anything is NOT a book is put in cart then Media Mail option should not be shown, but on my site Media Mail option is always shown. Anyone have a thought on why??? Thanks.

  7. #7
    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
    Still have this issue with new K11a on v157c. I put the proper category for books which is shipped Media Parcel Mail in code as instructed. What it is suppose to do is if anything is NOT a book is put in cart then Media Mail option should not be shown, but on my site Media Mail option is always shown. Anyone have a thought on why??? Thanks.
    I had a similar situation. Ajeh (Linda) provided me with a starter routine to permit the exclusion of a class or classes of shipping types depending on the shopping cart contents. To my amazement, that starter code is now in the new version of usps.php, and available for anyone to play with.

    With whatever editor program you're using, do a search for " // *** Customizations once per display ***"

    The lines after that are as follows:

    // bof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
    // change false to true to use
    if (false) {
    $chk_cart = 0;
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','12');
    $chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id','15');
    }
    // see below use of $chk_cart
    // eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart

    This was my initial attempt to keep certain things from being shipped in a small flat rate box, and $master_categories_id shown here was the first two categories that I needed to exclude from small flat rate shipping . I have since expanded on this to exclude a wide variety of shipping types, depending on the category or the product or the quantity being ordered. If you want to try this, simply substitute your category number for books for the '12' shown in the example above. You'll need to comment out the next statement if you don't want your category '15' to be similarly affected. And it would be a good idea to substitute the shipping type you're excluding (Media) in the comments, in place of the 'USPS Priority MailTM Small Flat Rate box' verbage. Otherwise, someone (possibly you) is going to be really confused at some point in the future when you need to edit this section or figure out why something isn't working.

    There is one more place where you need to insert a few lines. Search for "$type_rebuilt = $type;"

    The first few lines after that should read:

    // bof: example to block USPS Priority MailTM Small Flat Rate Box when anything from specific master_categories_id are in the cart
    // see above for $chk_cart settings
    // change false to true to use WAS FALSE
    if (true) {
    if ($chk_cart > 0 && $type == 'Priority MailTM Small Flat Rate Box') {
    // echo 'USPS $type: ' . $type . ' $chk_cart:' . $chk_cart . ', line 575 <br>';
    continue;
    }
    }
    // eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart

    You'll need to substitute 'MEDIA' where the line above says 'Priority MailTM Small Flat Rate Box.' And you might want to change the wording of the comments so it's refers to Media Mail rather than the Small Flat Rate Box in the code.

    The first section of code checks the category number of the items in the cart. If any of them is in a category that could not be shipped by the specified shipping type, then it increments the variable $chk_cart. The second section of code tests $chk_cart to see whether it is greater than zero AND if the shipping type variable ($type) is exactly equal to the value in the quotes. If so, that shipping type will be excluded from the list of shipping types that the customer can choose from.

    If you're comfortable tweaking the code, you can expand on this the same way I did, to check for multiple different product or category numbers, for the quantities of certain items, and for whatever else you need to exclude from certain shipping types. Over the years, I've added enough checks that it's very seldom a customer can specify a shipping type unsuitable for the product(s) in the cart. Every test you add will slow down execution just a little bit, of course, so it you have an extremely varied inventory, this may not work well for you. But it has been ideal for us, with a fairly small number of broad categories.

  8. #8
    Join Date
    Mar 2021
    Location
    Campbell, Texas USA
    Posts
    13
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by HeleneWallis View Post
    The first section of code checks the category number of the items in the cart. If any of them is in a category that could not be shipped by the specified shipping type, then it increments the variable $chk_cart. The second section of code tests $chk_cart to see whether it is greater than zero AND if the shipping type variable ($type) is exactly equal to the value in the quotes. If so, that shipping type will be excluded from the list of shipping types that the customer can choose from.
    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.

  9. #9
    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.

 

 

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