Results 1 to 10 of 64

Hybrid View

  1. #1
    Join Date
    May 2010
    Location
    Texas
    Posts
    508
    Plugin Contributions
    0

    Default Re: Conditional shipping option?

    Found this section. It does not seem to differentiate between Domestic and International.
    First Class International shows no estimate.

    Code:
          /********************* CUSTOM START:  IF YOU HAVE CUSTOM TRANSIT TIMES ENTER THEM HERE ***************/
          switch (TRUE) {
            case (preg_match('#Priority Mail Express#i', $service)):
                $time = '1 - 2 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#Priority MailTM#i', $service)):
                $time = '2 - 3 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#Standard PostRM#i', $service)):
                $time = '4 - 7 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#First\-Class#i', $service)):
              $time = '2 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#Media MailRM#i', $service)):
            default:
              $time = '';
          /********************* CUSTOM END:  IF YOU HAVE CUSTOM TRANSIT TIMES ENTER THEM HERE ***************/

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

    Default Re: Conditional shipping option?

    You might look for the International function for the displayed days:
    function parseIntlTransitTimeResults($Package, $service) {
    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!]
    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
    May 2010
    Location
    Texas
    Posts
    508
    Plugin Contributions
    0

    Default Re: Conditional shipping option?

    I could be wrong, but maybe the problem is that there is no international equivalent of the custom replacement above.

    The closest thing I could find is this, and I'm at a loss to understand what this even does.

    Code:
        if (isset($this->transittime[$service]) && $this->transittime[$service] == '' && preg_match('#(GXG|International)#i' , $service)) {
          $time = $Package['SvcCommitments'];
          $time = preg_replace('/Weeks$/', MODULE_SHIPPING_USPS_TEXT_WEEKS, $time);
          $time = preg_replace('/Days$/', MODULE_SHIPPING_USPS_TEXT_DAYS, $time);
          $time = preg_replace('/Day$/', MODULE_SHIPPING_USPS_TEXT_DAY, $time);
          $this->transittime[$service] = $time == '' ? '' : ' (' . $time . ')';
        }

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

    Default Re: Conditional shipping option?

    And if you just add the text in RED what happens:
    Code:
          switch (TRUE) {
            /********************* CUSTOM START:  IF YOU HAVE CUSTOM TRANSIT TIMES ENTER THEM HERE ***************/
            case (preg_match('#Priority Mail Express#i', $service)):
              $time = '3 - 5 business ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#Priority Mail#i', $service)):
              $time = '6 - 10 business ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#Global Express Guaranteed#i', $service)):
              $time = '1 - 3 business ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#USPS GXG.* Envelopes#i', $service)):
              $time = '1 - 3 business ' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            case (preg_match('#First\-Class#i', $service)):
              $time = 'Varies by destination 7-12 days'; // '' . MODULE_SHIPPING_USPS_TEXT_DAYS;
              break;
            default:
              $time = '';
    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!]
    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
    May 2010
    Location
    Texas
    Posts
    508
    Plugin Contributions
    0

    Default Re: Conditional shipping option?

    It has no effect.
    I changed the entry for USPS priority and it worked. But that is because this section is only for Domestic.
    The section of code just below this domestic section seems to handle international. But it does not have the same "Custom transit time" section

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

    Default Re: Conditional shipping option?

    Are you trying to make the First-Class say the 7-12 days on Domestic or International?

    Domestic uses:
    function parseDomesticTransitTimeResults($Package, $service) {

    International uses:
    function parseIntlTransitTimeResults($Package, $service) {
    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!]
    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
    May 2010
    Location
    Texas
    Posts
    508
    Plugin Contributions
    0

    Default Re: Conditional shipping option?

    Quote Originally Posted by Ajeh View Post
    Are you trying to make the First-Class say the 7-12 days on Domestic or International?

    Domestic uses:
    function parseDomesticTransitTimeResults($Package, $service) {

    International uses:
    function parseIntlTransitTimeResults($Package, $service) {
    USPS first Class is only offered for International shipments. USPS priority is the only service offered for domestic shipments.

 

 

Similar Threads

  1. v139h conditional shipping modules
    By bigduffeye in forum Addon Shipping Modules
    Replies: 11
    Last Post: 12 Feb 2013, 05:49 PM
  2. v139h Free shipping option, disable one other shipping option
    By stylenote in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 21 Jul 2012, 09:56 PM
  3. conditional based attributes to calc shipping?
    By shewhorn in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 16 Feb 2010, 03:18 AM
  4. Shipping option only shows as free shipping - i want all options
    By RomanSon3625 in forum Addon Shipping Modules
    Replies: 8
    Last Post: 14 Nov 2007, 04:13 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