Results 1 to 10 of 109

Hybrid View

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

    Default Re: ZipShip - Support Thread

    Quote Originally Posted by allmart View Post
    I am using One Page Checkout, when a postal code is not within our delivery area a pop-up displays "Please contact the store owner; some required elements of this page are missing." Once OK is clicked then the page is displayed without the shipping and payment details and a message Not Available At This Time Sorry, we are not shipping to your region at this time. Please contact us for alternate arrangements. Anyway of not displaying the initial pop-up?

    Thanks,
    That "some required elements are missing" message indicates that the template 'rendering' of the page is missing some required jQuery selectors. You can view the browser's "Console Log" by pressing F12 and then the 'Console' tab. That will contain information that identifies which elements are missing.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: ZipShip - Support Thread

    Quote Originally Posted by lat9 View Post
    Quote Originally Posted by allmart View Post
    I am using One Page Checkout, when a postal code is not within our delivery area a pop-up displays "Please contact the store owner; some required elements of this page are missing." Once OK is clicked then the page is displayed without the shipping and payment details and a message Not Available At This Time Sorry, we are not shipping to your region at this time. Please contact us for alternate arrangements. Anyway of not displaying the initial pop-up?

    Thanks,
    That "some required elements are missing" message indicates that the template 'rendering' of the page is missing some required jQuery selectors. You can view the browser's "Console Log" by pressing F12 and then the 'Console' tab. That will contain information that identifies which elements are missing.
    Actually this situation is not a result of anything wrong with ZipShip.

    OPC appears not to be expecting "no shipping results at all", so it's croaking.
    I've opened issue https://github.com/lat9/one_page_checkout/issues/285 where I describe more details about it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    190
    Plugin Contributions
    0

    Default Re: ZipShip - Support Thread

    I tried implementing this mod but nothing happens when you press the "confirm order" button and listed below is what is listed in the log:

    Code:
    PHP Warning:  strpos(): Empty needle in /***/***/***includes/modules/shipping/zipship.php on line 113
    Line 113 is listed in red below.

    Code:
                   $this->dest_zone = false;
                    $this->default_zone = false;
                    // $this->dest_zipcode = substr(strtoupper($order->delivery['postcode']), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
                    $this->dest_zipcode = strtoupper(str_replace([' ', '-'], '', $order->delivery['postcode']));
                    for ($i = 1; $i <= $this->num_zones; $i++) {
                        $current_table = "MODULE_SHIPPING_ZIPSHIP_CODES_$i";
                        if (defined($current_table)) {
                            $zipcode_table = constant($current_table);
                            if ($zipcode_table === '00000') {
                                $this->default_zone = $i;
                            } else {
                                // Read codes from config
                                $zipcodes = explode(',', str_replace([' ', '-'], '', strtoupper($zipcode_table)));
    
                                // Sort codes by length (longest first) and alpha
                                usort($zipcodes, function($a, $b){
                                    $a = trim($a, '!');
                                    $b = trim($b, '!');
                                   return (strlen($a) < strlen($b)) ?: strcmp($b, $a);
                                });
                               // 1. For pattern matching, assume a "prefix". That is, for M***** just list M, and for L4**** just use L4.
    
                               // 2. In any listed postal code, if you add a "!" at the beginning or end of the code, it will exclude that one. eg: M4B1Y! or !M4B1Y would exclude all M4B1Y* codes.
                              
                               // One caveat to note: if a postalcode pattern is present in more than one zone, the "last" non-excluded match will be used for calculating rates. (eg: if it matches in zones 1 and 3, then the rates from zone 3 will apply, ignoring its existence in zone 1).
    
                                // Check for exclusion patterns defined with a starting or ending ! symbol
                                foreach($zipcodes as $check_against) {
                                    if (strpos($check_against, '!') === false) continue; // if no ! skip checking this iteration
                                    if (strpos($this->dest_zipcode, trim($check_against, '!')) === 0) { // strip ! to do matching
                                        $this->dest_zone = false;
    
                                        // If exclusion detected, use "continue" to end this foreach and skip the next one as well
                                        continue 2;
                                    }
                                }
    
                                // Pass if the supplied code matches a defined prefix pattern
                                foreach($zipcodes as $check_against) {
                                    if (strpos($check_against, '!') !== false) continue;
                                    if (strpos($this->dest_zipcode, $check_against) === 0) {
                                        $this->dest_zone = $i;
    
                                        // If a match is found, end this foreach
                                        break;
                                    }
                                }
                            }
                        }
                    }
    Thanks in advance for your help!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: ZipShip - Support Thread

    What are all your zone rules? It seems like you've left one that has only a ! on its own.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Feb 2016
    Location
    Canada
    Posts
    190
    Plugin Contributions
    0

    Default Re: ZipShip - Support Thread

    I did find that 2 of my postal codes had "######", don't know why but I will correct and see if the issue persists.

    Thanks again

  6. #6
    Join Date
    Mar 2010
    Location
    Butte, MT
    Posts
    79
    Plugin Contributions
    0

    Default Re: ZipShip - Support Thread

    I'm running into an odd error in ZipShip 3.0.1 on Zen-Cart 1.5.7c.

    For the one zone that has two zip codes (entered as: 98571,98562), the shipping option does not display. It also does not display on the zones listed after the one with two zip codes...

    for all the other zones, where there is only one zip code, it works fine.

    When the address is in a working zone, the user sees this on the shipping page:

    Shipping Method:
    This is currently the only shipping method available to use on this order.
    Zipcode Rate
    $12.00
    Deliver To Zipcode: 98535
    But in the non-working zone, they only get this:

    Shipping Method:
    This is currently the only shipping method available to use on this order.
    I suspect something is getting boogered with the comma...

    Any ideas?
    Keith Seyffarth
    Paydirt Design

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

    Default Re: ZipShip - Support Thread

    Quote Originally Posted by weif View Post
    I'm running into an odd error in ZipShip 3.0.1 on Zen-Cart 1.5.7c.

    For the one zone that has two zip codes (entered as: 98571,98562), the shipping option does not display. It also does not display on the zones listed after the one with two zip codes...

    for all the other zones, where there is only one zip code, it works fine.

    When the address is in a working zone, the user sees this on the shipping page:



    But in the non-working zone, they only get this:



    I suspect something is getting boogered with the comma...

    Any ideas?
    Not at the moment, but are there any PHP issues logged in the site's /logs directory?

  8. #8
    Join Date
    Mar 2010
    Location
    Butte, MT
    Posts
    79
    Plugin Contributions
    0

    Default Re: ZipShip - Support Thread

    Quote Originally Posted by weif View Post
    I suspect something is getting boogered with the comma...
    Well, it appears to not be the comma...

    I thought that the easiest way to address the issue for the moment, would be to add another zone by modifying the /includes/modules/shipping/zipship.php and changing the $this->num_zones value, but that didn't work.

    Now I have only one zip code in each zone, but only the first 3 zones work. Zones 4, 5, and 6 don't. The result is the same - three zip codes show the 'this is the only option" text, but don't actually give the option...
    Keith Seyffarth
    Paydirt Design

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. SysCheck [support thread]
    By swguy in forum All Other Contributions/Addons
    Replies: 36
    Last Post: 24 Oct 2020, 05:28 AM
  3. v151 Ship2Pay Support thread
    By Design75 in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 5 Nov 2019, 01:14 PM
  4. goMobile Support Thread
    By steveyork136 in forum Addon Templates
    Replies: 29
    Last Post: 26 Aug 2015, 11:56 AM
  5. ZJ Silver Support Thread
    By anthonyd in forum Addon Templates
    Replies: 220
    Last Post: 5 Nov 2010, 03:30 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