Page 4 of 4 FirstFirst ... 234
Results 31 to 40 of 40
  1. #31
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    Let me get this standard post thing working again, and i'll attach my usps file with the mods i use to disable it via product restriction triggers for you. i've got a dozen mods to the usps module, so i'll point out the ones specific to it.

  2. #32
    Join Date
    Aug 2011
    Posts
    103
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    so, to disable the USPS module on a trigger, i used essentially this:
    Code:
    if (in_array(1, $_SESSION['cart']->ship_restrict) && $this->usps_countries != "US") $this->enabled = false;
    if (in_array(2, $_SESSION['cart']->ship_restrict)) $this->enabled = false;
    Put it right below the "types_to_skip_over_certain_value" array setting, within the __construct function. About mid-100s in linecount.

    my 'ship_restrict' array is the system I use to track restrictions, and it's added to the cart elsewhere since I use that array in a lot of places on my site. The first line looks for a restriction of '1' and checks the destination country. '1' means that it is an orm-d item and it can only be shipped via ground, and to US addresses. A restriction of '2' means that it needs to go fedex hazmat, and turns off the usps module entirely. Later on, for ajeh's groundonly mod, i use the 'ship_restrict' array instead of the 'in_cart_check' system.

    if you're using ajeh's trigger system, use something like this to turn off the module depending on a restriction.
    Code:
    if ($_SESSION['cart']->in_cart_check('products_groundonly','1') && $this->usps_countries != "US") $this->enabled = false;
    if ($_SESSION['cart']->in_cart_check('products_groundonly','2') $this->enabled = false;
    hope that helps, phil!

  3. #33
    Join Date
    Apr 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    Any chance that you can redo Post#1 for the new USPS module?

    Thanks!!

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

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    I am being slow this morning ... umm ... what do you want me to do?
    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. #35
    Join Date
    Apr 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    In answer to post #1 in this thread you created the following (which I was hoping that you would do again for the new USPS mod):

    I believe you are trying to stop the use of Priority Mail when the Zone is greater than 4 ... if so then try this ...

    Around line 393 add the code in RED:
    Code:
    $type = $this->clean_usps_marks($Package['MailService']);
    $usps_ship_zone = $uspsQuote['Package'][$i]['Zone'];
    //echo 'USPS Domestic $type: ' . $type . ' $cost: ' . $cost . '<br>';
    then around line 592 change the code to read:
    Code:
    $show_hiddenCost = '';
    if ($type_rebuilt == 'Priority MailTM' && $usps_ship_zone > 4) {
    //echo 'Skip: ' . $type_rebuilt . ' zone: ' . $usps_ship_zone . '<br>';
    // skip
    } else {
    $methods[] = array('id' => $type_rebuilt,
    'title' => $title . $show_hiddenCost,
    'cost' => $cost,
    );
    }
    } else {
    Linda McGrath

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

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    I see what you are referring to ...

    This line:
    Code:
    $usps_ship_zone = $uspsQuote['Package'][$i]['Zone'];
    was added to the USPS September 7, 2014 K5 as this:
    Code:
              // methods shipping zone
              $usps_shipping_methods_zone = $uspsQuote['Package'][$i]['Zone'];
    So in the test for it you could change:
    Code:
    if ($type_rebuilt == 'Priority MailTM' && $usps_ship_zone > 4) {
    To use:
    Code:
    if ($type_rebuilt == 'Priority MailTM' && $usps_shipping_methods_zone > 4) {
    and not add the line:
    Code:
    $usps_ship_zone = $uspsQuote['Package'][$i]['Zone'];
    to the code at all as that is now built in with just a different variable ...
    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. #37
    Join Date
    Oct 2005
    Posts
    211
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    Forgive me but I am confused with these code suggestions for older version from the past and good advice along the way.
    Using the latest USPS.php with the last post #36 by Ajeh, my test with using code from #2 and changing it as in #36 still only gave Priority in my own zone. No Standard post shipping. (Yes, I have it checked off and Priority only on the module as choices, nothing else.

    I love the idea of changing the products to be "selective for ground only (standard post)", for commercial product / ORM-D. with USPS.
    But we need to just get standard post for "All Zones" now. Even if priority just is not an option. Will fix that later but our store is down now.
    Its been awhile since I played around in the DB.

    Even the USPS postal man from 20 plus years could not figure out how to ship ground anymore on his machine for 40 min.
    USPS website now has an ORM-D select button. That's news to us, but maybe not to you all. They print out a special sticker and it ships.
    And of course our stores shipping stopped working when we found out, and are down for maintenance with no more orders.
    Has anyone had success with all zones available for ground only - USPS only shipping?
    Regards,
    Justwade
    Zen 1.5.5f
    Zen 1.3.9h, Zen 1.27 + (did that, done with that)

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

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    USPS changed Standard Post to only work with Zones 5-9 and not Zones 1-4 ...

    Example: If I ship from 44026 to 44026 I have no Standard Post, but if I ship from 44026 to 33601 I do have Standard Post ...

    You can force Standard Post, but then you will not get any other Shipping method ...

    Do you want to ship *everything* in your shop as Standard Post only?
    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!

  9. #39
    Join Date
    Oct 2005
    Posts
    211
    Plugin Contributions
    0

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    Quote Originally Posted by Ajeh View Post
    USPS changed Standard Post to only work with Zones 5-9 and not Zones 1-4 ...

    Example: If I ship from 44026 to 44026 I have no Standard Post, but if I ship from 44026 to 33601 I do have Standard Post ...

    You can force Standard Post, but then you will not get any other Shipping method ...

    Do you want to ship *everything* in your shop as Standard Post only?
    Yes, if that what it takes to get our store back and another unprofitable sale in today's world. (another rant)
    We just want to get folks to be able to see shipping costs before they checkout. It just right in our minds, unlike other corporate views on that matter. (a second rant, geez, I must be getting loopy by now)

    Later, when my mind is not so cluttered I would like to experiment with the suggestions of getting ORM-D specific products to clear up shipping choices with the needed DB changes. But the first issue, like most of us all, is not the only thing we have to deal with to get through a day or hopefully another year. So to sum up, yes, we would like the ability to ground ship anywhere in the USA at any cost of shipping methods.

    Thank you for your quick response Linda!,
    Justwade
    Zen 1.5.5f
    Zen 1.3.9h, Zen 1.27 + (did that, done with that)

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

    Default Re: USPS RateV4 Intl RateV2 - January 26, 2014 Issue

    To force Standard Post on all USPS shipping where no other shipping method will be available for Domestic shipping, you need to edit the USPS shipping module:
    /includes/modules/shipping/usps.php

    and change the code in RED around line 806 to true:
    // force GroundOnly results in Stand Post only being offered
    // to use, you must have a field for products_groundonly in the products table
    // then uncomment the in_cart_check for the products_groundonly
    // when $usps_groundonly is set to true, only Stand Post will show
    $usps_groundonly = 'true';
    // $usps_groundonly = ($_SESSION['cart']->in_cart_check('products_groundonly','1') ? 'true' : 'false');
    Now, regardless of what shipping methods you have checked, be sure Standard Post is checked, only Standard Post will work for all USPS shipping and no other shipping method will work ...
    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!

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. USPS RateV4 Intl RateV2 October 30, 2014 K6 for - November 2, 2014
    By Ajeh in forum Zen Cart Release Announcements
    Replies: 1
    Last Post: 16 Nov 2014, 02:48 PM
  2. v139h USPS RateV4 Intl RateV2 - January 26, 2014 Issue
    By Kamino84 in forum Addon Shipping Modules
    Replies: 21
    Last Post: 13 Feb 2014, 05:20 PM
  3. Replies: 4
    Last Post: 28 Jan 2014, 03:28 AM
  4. Replies: 14
    Last Post: 24 Jan 2014, 06:51 PM
  5. USPS RateV4 Intl RateV2 Jan 26, 2014 Rates, January 26, 2014 Version K1
    By Ajeh in forum Zen Cart Release Announcements
    Replies: 0
    Last Post: 24 Jan 2014, 06:49 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