-
ZipShip - Support Thread
I couldn't find a support-thread for the ZipShip shipping-module (other than a couple that have been closed), so here we go ...
I've just submitted v2.0.0 to the plugins for review; it's been tested under Zen Cart 1.5.4 and 1.5.5 but should be OK for earlier versions, too. The following changes were incorporated:
- Use PSR indentation
- Add "extends base" to class definition
- Rename constructor to __construct for PHP 7+ usage
- Don't enable the shipping method unless the current ship-to address is configured for the method.
- Change usage of the PHP "split" function for PHP 5.3+ usage (it's deprecated).
Note: This version of the ZipShip shipping module is also needed for compatibility with the One-Page Checkout plugin.
-
Re: ZipShip - Support Thread
I installed zipship for a client yesterday and set up their first zone, and everything seemed fine.
Today I got their complete local delivery fee table, which requires four zones. This seems to have revealed two possible issues.
First, I changed the number of zones in the includes/modules/shipping/zipship.php file from 3 to 4. This did not update the admin. I had to remove the module and then install the module again to get the fourth entry. Was this correct, or was there something else that needed to be done?
Second, I configured everything, but the dot in the list of modules is staying orange, instead of green as it was when I first set it up. Is there something I need to do to change this? It appears to be working correctly, as far as I can tell, just the indicator implies an error...
-
Re: ZipShip - Support Thread
@weif, that's expected behavior (needing to remove and re-install after changing the number of zones).
I'll need to check as to why the orange light is remaining.
-
Re: ZipShip - Support Thread
Lat9,
I think I've found another issue. It appears that if a delivery address is entered as a ZIP+4 (i.e. 59701-6593), the check fails and doesn't match any delivery options.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
weif
I think I've found another issue. It appears that if a delivery address is entered as a ZIP+4 (i.e. 59701-6593), the check fails and doesn't match any delivery options.
It looks like changing
Code:
$this->dest_zipcode = $order->delivery['postcode'];
to
Code:
$this->dest_zipcode = substr($order->delivery['postcode'],0,5);
around line 103 of includes/modules/shipping/zipship.php appears to correct the issue, but there may still be something missing, or some issue this causes.
-
Re: ZipShip - Support Thread
weif, thanks for the report; I've logged this (as well as the other issue you reported) in the plugin's GitHub repository.
The solution you posted might work for US-based zipcodes, but not all zipcodes are the same format. I'll need to consider the best approach for full resolution of the issue.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
weif, thanks for the report
Thank you. Glad to be of assistance.
Quote:
Originally Posted by
lat9
The solution you posted might work for US-based zipcodes, but not all zipcodes are the same format. I'll need to consider the best approach for full resolution of the issue.
I understand that different regions and countries have their postal codes configured and formatted differently. But I think this will work in my case, as the florist in question only delivers to about 8 US ZIP codes.
Overall, though, this is an awesome module and has relieved a lot of frustration for at least one flower shop.
-
Re: ZipShip - Support Thread
I've just submitted v2.0.1 to the Zen Cart plugins for review. That version contains changes for:
- Changing the number of ZipShip "zones" doesn't clean up previous settings.
- US Zip Codes entered in 99999-9999 format don't result in a match.
- Remove unused configuration setting (Skip Zipcodes)
- Add an overall zone setting for the shipping method.
Please note that this version makes use of the store's Configuration->Minimum Values->Post Codes value in its processing, truncating an order's ship-to zipcode to that minimum length prior to look-up in the ZipShip configuration. Any zip/post code entered is also uppercased prior to lookup; potentially making this plugin more useful on stores where the postcode is an alphanumeric value rather than simply numeric.
The plugin release is currently available on the plugin's GitHub repository: https://github.com/lat9/zipship/releases/tag/v2.0.1
-
Re: ZipShip - Support Thread
v2.0.1 is now available for download from the Zen Cart Plugins.
-
2 Attachment(s)
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Ok, here are my ZipShip configs: Attachment 17126
This is what I get at checkout when using it. The zipcode is correct: Attachment 17127
It doesn't seem to be picking up the zip code entered in the shopping cart.
-
Re: ZipShip - Support Thread
I figured out what the problem was. I had to go into Minimum Values and set the post code length to 5. It was 4. Now the mod is working just fine.
-
Re: ZipShip - Support Thread
@wtashby, thanks for the information and the update! I'm happy that ZipShip is now working for you!
-
Re: ZipShip - Support Thread
I installed the plugin but i can't get it to work.
I set on zip code in zone 1 as 94939. Set the rate at 10:9.99.
The only option being displayed at checkout is for pickup.
Any ideas what i am doing wrong?
It is on a live test site here at www.royal-fleur.com/wholesale
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
nicksab
I installed the plugin but i can't get it to work.
I set on zip code in zone 1 as 94939. Set the rate at 10:9.99.
The only option being displayed at checkout is for pickup.
Any ideas what i am doing wrong?
It is on a live test site here at
www.royal-fleur.com/wholesale
I get a 404 (page not found) when I attempt to view that link.
What is the address that you're using when you checkout? Is it in that 94939 zipcode?
How much does the package weigh? With that setup, up to 10 lbs will be 9.99. Over that, the shipping method is disabled.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
I get a 404 (page not found) when I attempt to view that link.
What is the address that you're using when you checkout? Is it in that 94939 zipcode?
How much does the package weigh? With that setup, up to 10 lbs will be 9.99. Over that, the shipping method is disabled.
I tried the address with 94939 zipcode in the biling and shipping. I also tried this zipcode in the shipping only.
I don t have any weight specified on any of my product. I am selling flowers arrangement on an items basis so there is no fixed weight. Could this be the problem?
Thank you
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
I get a 404 (page not found) when I attempt to view that link.
What is the address that you're using when you checkout? Is it in that 94939 zipcode?
How much does the package weigh? With that setup, up to 10 lbs will be 9.99. Over that, the shipping method is disabled.
The link should work now. My server was down for awhile.
http://www.royal-fleur.com/wholesale/
-
Re: ZipShip - Support Thread
Could you post a screen-shot of your ZipShip configuration?
-
1 Attachment(s)
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Could you post a screen-shot of your ZipShip configuration?
Here is the screenshot. I am not getting any error in my logs so I honestly don t get it.
Attachment 17439
-
Re: ZipShip - Support Thread
What's your store's configuration for Configuration->Minimum Values->Post Code? The default is 4, but minimum lengths of US postcodes is 5. If the value's currently 4, try changing that to 5!
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
What's your store's configuration for Configuration->Minimum Values->Post Code? The default is 4, but minimum lengths of US postcodes is 5. If the value's currently 4, try changing that to 5!
I already check this based on other post. It is set to 5.
-
Re: ZipShip - Support Thread
Does setting the sort order greater than zero help?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
I get a 404 (page not found) when I attempt to view that link.
What is the address that you're using when you checkout? Is it in that 94939 zipcode?
How much does the package weigh? With that setup, up to 10 lbs will be 9.99. Over that, the shipping method is disabled.
What is your expectation of cost-by-pounds? As I'd noted before, your current setup will auto-disable itself for any order over 10 (I think, the print's kind of small) pounds.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
What is your expectation of cost-by-pounds? As I'd noted before, your current setup will auto-disable itself for any order over 10 (I think, the print's kind of small) pounds.
I am using as per items basis. The weight of my product are set to 0. I am not using as per weight basis.
I tried to change the weight of the product to 5 but it doesn t work either.
I tried to set sort order to 1 instead of 0 but that didn't work either.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
nicksab
I am using as per items basis. The weight of my product are set to 0. I am not using as per weight basis.
I tried to change the weight of the product to 5 but it doesn t work either.
I tried to set sort order to 1 instead of 0 but that didn't work either.
Same comment, different configuration. You've got (from your previous posting) only one item configured, so if the customer orders more than 10 items, the shipping method won't enable itself.
-
Re: ZipShip - Support Thread
Could you use MySQL to pull zipcodes instead? Not sure how to do this something like this:
PHP Code:
$zipcode_prefix = substr($order->delivery['postcode'],0,3);
global $db;
$check = $db->Execute("select zipcodezone from " . TABLE_ZIPCODEZONE . " where '" . $zipcode_prefix . "' BETWEEN zipcode_start and zipcode_end");
while (!$check->EOF) {
$dest_zone = $check->fields['zipcodezone'];
$check->MoveNext();
}
// echo $dest_zone;
than in MySQL do this:
CREATE TABLE `zipcodezone` (
`zipcode_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`zipcode_start` char(3) NOT NULL default '0',
`zipcode_end` char(3) NOT NULL default '0',
`zipcodezone` int(1) NOT NULL default '0');
INSERT INTO `zipcodezone`
(`zipcode_id` ,`zipcode_start` ,`zipcode_end` ,`zipcodezone`)
VALUES (1, '004', '005', 8),
(2, '010', '089', 8), etc
Not sure how to implement this though. Thanks
-
Re: ZipShip - Support Thread
I am trying to do following; look up zipcode using 3 digit prefix of zip code and use zones; I am trying to figure out now how to enable this to only a certain shipping zone.
basically use MYSQL to look up 3 digit code like this
(1, '010', '089', 8) so zipcodes starting with 010 to 089 will be zone 8. Now only applied to Continental USA.
Then in zone definition add US states to this and use Shipping Zone enabled for this zone. As of now since the shipping_zone is for whole usa
Then I will add another module for AK, PR, etc Non Continental states.
So basically one says this:
Code:
Alaska 99922 United States
Available Shipping Methods
Rates
Ground delivery (The shipping rate cannot be determined at this time)
$0.00
Rush Delivery (Shipping to 99922 (1 x 3.00lb(s)))
That is why I am trying to enable Shipping_zone.. to eliminate "Ground delivery (The shipping rate cannot be determined at this time)"
I got it working except for Shipping_zone it don't seem to work. Make sense?
-
Re: ZipShip - Support Thread
@tmccaff, Would you please take this discussion somewhere besides the ZipShip shipping-module's support thread ... since it's not having to do with this module?
-
Re: ZipShip - Support Thread
I am asking why the ZipCode shipping_zone not working In 1.5.5; is there an updated code for this to work?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
tmccaff
I am asking why the ZipCode shipping_zone not working In 1.5.5; is there an updated code for this to work?
Right, you're asking about Seven-Zone Zipcode-based shipping module, not ZipShip. Please continue that discussion elsewhere.
-
Re: ZipShip - Support Thread
I tried both plugins and either does Shipping Zone which is what I need. This module has it but don't work. Geez
-
Re: ZipShip - Support Thread
I am using zipship (zone 1) for Store Pickup by inserting zipcode that are allowed to use Store Pickup.
I also set zone 2 to 00000 for all 5 digits zip codes (I believe that is what I read) and that does not work. I also noticed that if I change Shipping Zone from none to the zone code choice the zipship module does not work at all. Change it back and Store Pickup works.
When I using Flat Rate module it will work if Shipping Zone is set to none. If you change it to the choice available it will not work.
This indicates to me that Locations/Taxes is not set up correctly. It is still set as it was before upgrading to 1.5.5e
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
EZorb
I am using zipship (zone 1) for Store Pickup by inserting zipcode that are allowed to use Store Pickup.
I also set zone 2 to 00000 for all 5 digits zip codes (I believe that is what I read) and that does not work. I also noticed that if I change Shipping Zone from none to the zone code choice the zipship module does not work at all. Change it back and Store Pickup works.
When I using Flat Rate module it will work if Shipping Zone is set to none. If you change it to the choice available it will not work.
This indicates to me that Locations/Taxes is not set up correctly. It is still set as it was before upgrading to 1.5.5e
Found that for the shipping zone problem reason not working correctly is you must have details setup for any state you want to limit/allow.
Still have problem with zipship when wanting all 5 digits zipcodes entering 00000. That still does not work or was that feature removed in an update?
Instead of entering a real zipcode I entered 00000 and no results. Next, I entered a comma after the 5 "0" like 00000,02101. I got expected results on 02101 when testing, nothing on any other 5 digit zipcodes.
How does zipship know 00000 means every USA state and territory?
Would this not have to setup somehow in Admin>Locations.....?
admin>modules>zipship>edit For example it shows:
"Zone 2 Zip Codes
Comma separated list of five character zip codes that are part of Zone 2.
Set as 00000 to indicate all five character zip codes that are not specifically defined."
Then what is the 00000 used for and is it used?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
EZorb
admin>modules>zipship>edit For example it shows: Zone 2 Zip Codes
Comma separated list of five character zip codes that are part of Zone 2.
Set as 00000 to indicate all five character zip codes that are not specifically defined.
Then what is the 00000 used for and is it used?
Ah, that "commentary" was present in the original plugin so I don't know what the original author intended. Based on the code, I'm guessing that he had a list of zipcodes that were being used and it was easy to "remove" an unwanted code by setting the value to 0.
There is nothing in the code (other than that configuration comment) that special-cases the 00000 case.
-
Re: ZipShip - Support Thread
I've just submitted ZipShip v3.0.0 to the Zen Cart moderators for review. Once approved, it can be downloaded here: https://www.zen-cart.com/downloads.php?do=file&id=312.
This release contains changes associated with the following GitHub issues and has been validated on Zen Cart 1.5.4 through 1.5.6c:
#7: Enable different title/description for each ZipShip 'zone' defined.
#8: Restructuring to prevent various PHP notices and warnings from being generated. Remove unused "Tax Basis" setting.
#9: A zipcode that matched a zipcode list, but failed to match the associated criteria could provide free shipping for the order.
#10: "Resurrect" the default 00000 zipcode 'catch-all'.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
I've just submitted ZipShip v3.0.0 to the Zen Cart moderators for review. Once approved, it can be downloaded here:
https://www.zen-cart.com/downloads.php?do=file&id=312.
This release contains changes associated with the following GitHub issues and has been validated on Zen Cart 1.5.4 through 1.5.6c:
#7: Enable different title/description for each
ZipShip 'zone' defined.
#8: Restructuring to prevent various PHP notices and warnings from being generated. Remove unused "Tax Basis" setting.
#9: A zipcode that matched a zipcode list, but failed to match the associated criteria could provide free shipping for the order.
#10: "Resurrect" the default 00000 zipcode 'catch-all'.
Now available for download.
-
Re: ZipShip - Support Thread
Is there any upgrade instructions?
On installing this it didn't work - not getting any rates on checkout.
Put original files back and it works again
I'm upgrading to 1.5.6c - so that's whats installed on test server.
zipship config -
Enable Zip Code Method
True
Calculation Method
Weight
Tax Class
--none--
Tax Basis
Shipping
Shipping Zone
--none--
Sort Order
0
Zone 1 Zip Codes
6004,6005,6100,6101,6102,6152,6153,6151,6152A
Zone 1 Shipping Table
14:15,70:20,130:25,999:50
Zone 1 Handling Fee
0
....
(70 zones)
-
Re: ZipShip - Support Thread
Thanks for the report, @royaldave. You can correct that processing by editing /includes/modules/shipping/zipship.php, finding:
Code:
protected function getQuote($dest_zone)
{
and adding the highlighted line:
Code:
protected function getQuote($dest_zone)
{
global $shipping_weight, $shipping_num_boxes, $item_count;
I'll get this issue and the associated correction noted on the plugin's GitHub repository for a follow-on update. Note that this update affects configurations that were/are using the "Weight" calculation method.
I'll be submitting v3.0.1 of ZipShip to the plugin moderators for review shortly and will report back here when it's available for download.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by lat9
I'll be submitting v3.0.1 of ZipShip to the plugin moderators for review shortly and will report back here when it's available for download.
Thanks, that seems to have fixed it !
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
royaldave
Thanks, that seems to have fixed it !
I appreciate the confirmation!
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by lat9
I'll be submitting v3.0.1 of ZipShip to the plugin moderators for review shortly and will report back here when it's available for download.
Available for download: https://www.zen-cart.com/downloads.php?do=file&id=312
-
Re: ZipShip - Support Thread
using 156c
Hi
I've found a bug with the latest zipship. Most of my postcodes are 4 digits long, however because some postcode areas are so big I split them by adding a suffix to them, eg I have 6056 charged at $30 and 6056A charged at $35.
I've just discovered that the "A" is getting chopped off and my 6056A is displaying as "6056" and charging $30.
Thanks.
-
Re: ZipShip - Support Thread
OK, I checked my old version of zipship and noticed this -
//$this->dest_zipcode = substr (strtoupper ($order->delivery['postcode']), 0, ENTRY_POSTCODE_MIN_LENGTH);
$this->dest_zipcode = strtoupper ($order->delivery['postcode']);
Assuming I made this change myself in the past, although I don't remember!!
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
royaldave
OK, I checked my old version of zipship and noticed this -
//$this->dest_zipcode = substr (strtoupper ($order->delivery['postcode']), 0, ENTRY_POSTCODE_MIN_LENGTH);
$this->dest_zipcode = strtoupper ($order->delivery['postcode']);
Assuming I made this change myself in the past, although I don't remember!!
That would be my assumption, too. When I'm marking up Zen Cart (and plugin) files, I normally bracket my changes with //-bof and //-eof comments with the date.
That way, when I'm upgrading I know to review (and possibly carry over) the change.
-
Re: ZipShip - Support Thread
I used to use auspostcode Shipping UK Postcode Shipping version 1.3 Modified for australian postcodes by Alan McKenney - www.alphaweb.com.au. It died.
Luckly found Zip Code. I have couple of questions:
1: Where does the post codes entered in admin are stored? what is the file called so I can save it.
2. In Australia we have 4 digit post codes (zipcodes) , do I need to change line
Code:
if ($zipcode_table === '00000') {
to 4 digit
Code:
if ($zipcode_table === '0000') {
will it make any difference? Min value already set to 4 digit.
3. Is there a way I can hard code the post codes in postcodes (ZipCodes)? I was able to do that in auspostcode. See below
Code:
//NSW STARTS HERE
if ($i == 2) {
$default_postcodes ='2740,2741';
$default_value = '100:19.95,10000:0.00';
$description = 'NSW';
}
//QLD STARTS HERE
if ($i == 3) {
$default_postcodes ='4000,4001';
$default_value = '100:8.95,10000:0.00';
$description = 'QLD';
}
etc etc;. up to 18 Zones. I have tried changing ' $default_postcodes' to ' $default_zipcodes' but did not work
Currently I have 18 zones working with ZipCode without the zone descriptions.
4. I have 18 zones, how can I name each individual zones so I can see the zone names in admin in order to identy when making changes. Again this was possible in auspostcode.
5. I need to make certain items below a certain amount of free shipping to certain postcodes.
This was possible in auspostcode like
Code:
if ($shipping == -1) {
$shipping_cost = 0;
$shipping_method = MODULE_SHIPPING_AUSPOSTCODE_UNDEFINED_RATE;
} else {
How can I make say a local postcode 4214 and order is over $100.00 to show 'Enjoy orders above $100 shipped FREE to your area' and add no shipping?
in auspostcode in languages English Mod Shipping >
Code:
define('MODULE_SHIPPING_AUSPOSTCODE_UNDEFINED_RATE', '<span style="color: grey; font-weight:bold;" >Enjoy orders above $100 shipped FREE to your area</span>');
\
I appreciate if someone has a solution for the above
-
Re: ZipShip - Support Thread
1. The post/zip code list(s) are stored in the database. You can change from the default of 3 zones by editing the zipship.php shipping-method (as identified in its readme).
2. No need to change that '00000' to '0000', it's just a marker value (since that's not normally a valid zipcode).
3. No need to 'hardcode', the zipcodes are configuration settings.
4. There's currently no support to "name" each selection.
5. ZipShip isn't as fancy as auspostcode: there are no free-shipping considerations.
-
Re: ZipShip - Support Thread
Oh no.. this is a heart breaker. No free shipping?.
I hope someone can come up with solution. This is really really needed. Damn so close yet so far away.
Still a great module :-)
-
Re: ZipShip - Support Thread
Has anyone get this to work for Canadian postal codes which are alpha numeric.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Has anyone get this to work for Canadian postal codes which are alpha numeric.
What version of ZipShip and what version of Zen Cart?
What's "not working"?
Would you also post the settings applied to ZipShip for review?
-
Re: ZipShip - Support Thread
Hi lat9,
I have yet to install it, just wanted to know if it work with Canadian postal codes before trying. So it should work?
Thanks
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Hi lat9,
I have yet to install it, just wanted to know if it work with Canadian postal codes before trying. So it should work?
Thanks
Should is the operative word!
-
Re: ZipShip - Support Thread
Don't know if this mod will do what I want. We deliver with our own trucks locally and want to charge extra for locations with postal codes that are farther away. So all customers in our area pay $10.00 shipping and others by specifying the postal codes pay $15.00. Hopefully i don't have to enter all the postal codes in my area and hoping that there is a default setting.
Thanks!!!
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Don't know if this mod will do what I want. We deliver with our own trucks locally and want to charge extra for locations with postal codes that are farther away. So all customers in our area pay $10.00 shipping and others by specifying the postal codes pay $15.00. Hopefully i don't have to enter all the postal codes in my area and hoping that there is a default setting.
Thanks!!!
You would (unfortunately) have to enter all the postal codes that are 'local' into the Zip Code List for one ZipShip Zone and enter 00000 as the Zip Code list for the other (out of range). Set the Calculation Method to Items and then enter the first Zones' Shipping Table as 9999:10 and the second one as 9999:15.
That will identify a $10.00 flat-rate shipping for the 'local' postal codes and $15.00 flat-rate shipping for further ones.
-
Re: ZipShip - Support Thread
Hi lat9,
Thanks for the replies. The problem I am having is that the format of my Canadian postal codes have a space between then(L4H 5A1 for example). Where in your wonderful code can I put the code to replace/remove the spaces, specifics will be appreciated.
Thanks in Advance!!!
-
Re: ZipShip - Support Thread
Never mind,
I figured it out I changed
$this->dest_zipcode = substr(strtoupper($order->delivery['postcode']), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
to
$this->dest_zipcode = substr(strtoupper(str_replace(' ', '',$order->delivery['postcode'])), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
which is working.
Great mod, don't know why I didn't find it sooner.
Thanks lat9!!!
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Hi lat9,
Thanks for the replies. The problem I am having is that the format of my Canadian postal codes have a space between then(L4H 5A1 for example). Where in your wonderful code can I put the code to replace/remove the spaces, specifics will be appreciated.
Thanks in Advance!!!
That shouldn't be an issue, so long as the minimum postcode length is set to 7, although some customers will enter that without the space.
Starting at line 63 of /includes/modules/shipping/zipship.php
Code:
// -----
// Gather the destination's zipcode, uppercasing and then truncating to the store's minimum zipcode length.
//
// NOTE: I'm counting on the address-book generation logic for the store to have properly ensured that the
// postcode entered is at least the minimum-length configured!
//
$this->dest_zone = false;
$this->default_zone = false;
$this->dest_zipcode = substr(strtoupper($order->delivery['postcode']), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
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 {
$zipcode_zones = explode(',', strtoupper($zipcode_table));
if (in_array($this->dest_zipcode, $zipcode_zones)) {
$this->dest_zone = $i;
}
}
}
}
... make the highlighted changes:
Code:
// -----
// Gather the destination's zipcode, uppercasing and then truncating to the store's minimum zipcode length.
//
// NOTE: I'm counting on the address-book generation logic for the store to have properly ensured that the
// postcode entered is at least the minimum-length configured!
//
$this->dest_zone = false;
$this->default_zone = false;
$this->dest_zipcode = substr(strtoupper(str_replace(' ', '', $order->delivery['postcode'])), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
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 {
$zipcode_zones = explode(',', strtoupper(str_replace(' ', '', $zipcode_table)));
if (in_array($this->dest_zipcode, $zipcode_zones)) {
$this->dest_zone = $i;
}
}
}
}
-
Re: ZipShip - Support Thread
Much better, Thanks!
Don't suppose there is a way to use wildcards in the postal code list. With most of my postal codes I only need the first 3 characters. There are a lot of variations.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Much better, Thanks!
Don't suppose there is a way to use wildcards in the postal code list. With most of my postal codes I only need the first 3 characters. There are a lot of variations.
In that section posted above, instead of using in_array to find matches, you could use a foreach loop to check for a match on the start.
-
Re: ZipShip - Support Thread
Thanks lat9 but that's over my head, your guidance is appreciated
-
Re: ZipShip - Support Thread
Given that you said you only care about first 3 characters, you could maybe even use this additional change which only matches on the customer's first 3 supplied postal code characters:
Code:
} else {
$zipcode_zones = explode(',', strtoupper(str_replace(' ', '', $zipcode_table)));
if (in_array(substr($this->dest_zipcode, 0, 3), $zipcode_zones)) {
$this->dest_zone = $i;
}
}
... and then only define 3-char patterns in the module's list of supported postal codes.
-
Re: ZipShip - Support Thread
Thanks DrByte,
This is the dilemma I'm facing. There are 124,000 area codes in the area we deliver. I recently discovered that if I only went with the first 3 characters of the postal codes I will lose the ability to charge extra for customers that are further away which are located by the last 3 characters of the postal codes (6 alpha/numeric characters in Canada). We are located in in Toronto, all the postal codes are prefixed with "M" and we deliver to all of them. The surrounding immediate surrounding are prefix with "L" and some are in our near vicinity, some we don't deliver to at all (too far) and some I want to if I can charge extra. This is why I was hoping to have the ability to use wild cards. M***** would cover all my postal codes in Toronto and say L4**** would cover all postal codes that have that prefix ... and so on.
One problem I anticipate is that there are postal codes with the same prefix that I don't want to deliver to at all. For example if I put L7E in my postal codes for Zone1 but I don't want to deliver to postal code L7E1H7, will it not give me the rate for Zone1 instead of telling the customer that we don't deliver to their area.
Unfortunately there is a limit of how many postal codes can be entered approximately 9,600. Is there a way to increase the limit so I can use zipship the hardway which I am more than happy with.
Don't know if there is an easy solution to my problem and would appreciate any suggestions.
-
Re: ZipShip - Support Thread
Here's a radical experiment.
1. For pattern matching, I wonder if we can skip using the *'s idea and just 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.
3. I also added stripping of hyphens ... so in theory this can also work for US zip codes where someone wants to add specificity in zip-plus-four format. (The original code trimmed all zips to the "minimum allowed length" in order to do matching, which kills the ability to do pattern-matching and negation.)
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).
Here's the updated code which does all this.
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, first by alpha, then by reverse-length so we process longest-first
usort($zipcodes, function($a, $b){
$a = trim($a, '!');
$b = trim($b, '!');
return strcmp($a, $b);
});
usort($zipcodes, function($a, $b){
$a = trim($a, '!');
$b = trim($b, '!');
return (strlen($a) < strlen($b)) ? 1 : -1;
});
// Check for exclusion patterns defined with a starting or ending ! symbol
foreach($zipcodes as $check_against) {
if ($check_against === '!' || 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;
}
}
}
}
}
if ($this->dest_zone === false && $this->default_zone === false) {
$this->enabled = false;
}
}
}
}
public function quote($method = '')
-
Re: ZipShip - Support Thread
You are the "Sensei". I will give it a whirl tomorrow and let you know.
Cheers!!!
-
Re: ZipShip - Support Thread
Preliminary tests look great ... thanks! I am trying to add more zones by changing $this->num_zones = 3; but nothing happens.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Preliminary tests look great ... thanks! I am trying to add more zones by changing $this->num_zones = 3; but nothing happens.
To change the number of zones, you'll need to "Remove" the module (after saving a copy of any zipcodes currently configured), update the number of zones and then re-install.
-
Re: ZipShip - Support Thread
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,
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
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.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Quote:
Originally Posted by
allmart
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.
-
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!
-
Re: ZipShip - Support Thread
What are all your zone rules? It seems like you've left one that has only a ! on its own.
-
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
-
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:
Quote:
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:
Quote:
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?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
weif
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?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
weif
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...
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Not at the moment, but are there any PHP issues logged in the site's /logs directory?
THANK YOU!
This appears to be an undocumented expected behavior...
From log files:
Code:
[07-Feb-2023 11:17:34 America/Los_Angeles] Request URI: /index.php?main_page=checkout_shipping, IP address: 63.153.103.46
#1 trigger_error() called at [/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/modules/shipping/zipship.php:195]
#2 zipship->getQuote() called at [/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/modules/shipping/zipship.php:108]
#3 zipship->quote() called at [/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/classes/shipping.php:174]
#4 shipping->quote() called at [/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/modules/pages/checkout_shipping/header_php.php:184]
#5 require(/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/modules/pages/checkout_shipping/header_php.php) called at [/var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/index.php:35]
--> PHP Warning: Missing title (MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE_4) or way (MODULE_SHIPPING_ZIPSHIP_TEXT_WAY_4) for the 'english' language; zipship is disabled. in /var/www/vhosts/artisticdesignsbybrenda.com/httpdocs/includes/modules/shipping/zipship.php on line 195.
I think that what is needed is an addition to the documentation where it says, "Starting with v3.0.0, you can customize the text displayed to the customer for each of the defined postcode zones..." Maybe at the end of that paragraph it should add something to the effect of, "If you have added additional zones, you MUST add entries to this file for each zone added."
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
weif
I think that what is needed is an addition to the documentation where it says, "Starting with v3.0.0, you can customize the text displayed to the customer for each of the defined postcode zones..." Maybe at the end of that paragraph it should add something to the effect of, "If you have added additional zones, you MUST add entries to this file for each zone added."
Sorry, I forgot to include the fix.
In the /includes/languages/english/modules/shipping[/YOUR_TEMPLATE]/zipship.php file (and/or other languages, as appropriate for your site), you need to add entries for:
Code:
MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE_[x]
MODULE_SHIPPING_ZIPSHIP_TEXT_WAY_[x]
(where [x] is the number of the zone in the zipship configuration). This needs to be done for each zone added beyond the default three.
So if you have six zones, and have changed
Code:
$this->num_zones = 3;
to
Code:
$this->num_zones = 6;
in /includes/modules/shipping/zipship.php, you will need to add entries:
Code:
define('MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE_4', 'Zipcode Rate');
define('MODULE_SHIPPING_ZIPSHIP_TEXT_WAY_4', 'Deliver To Zipcode: ');
define('MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE_5', 'Zipcode Rate');
define('MODULE_SHIPPING_ZIPSHIP_TEXT_WAY_5', 'Deliver To Zipcode: ');
define('MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE_6', 'Zipcode Rate');
define('MODULE_SHIPPING_ZIPSHIP_TEXT_WAY_6', 'Deliver To Zipcode: ');
You may want or need to change these from the default text.
-
Re: ZipShip - Support Thread
THANX for providing the fix.
I'm sure it will help others now and in the future.
-
Re: ZipShip - Support Thread
interesting.. I've used zipship for as long as I've used zencart and never had to do this.
However I do have this coding amendment in mine -
//$this->dest_zipcode = substr(strtoupper($order->delivery['postcode']), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
$this->dest_zipcode = strtoupper ($order->delivery['postcode']);
Dumb dumb me didn't comment why, but I wonder if it might be a simpler solution...
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
royaldave
interesting.. I've used zipship for as long as I've used zencart and never had to do this.
However I do have this coding amendment in mine -
//$this->dest_zipcode = substr(strtoupper($order->delivery['postcode']), 0, (int)ENTRY_POSTCODE_MIN_LENGTH);
$this->dest_zipcode = strtoupper ($order->delivery['postcode']);
Dumb dumb me didn't comment why, but I wonder if it might be a simpler solution...
I don't think so.
That 'correction' appears to be reinstating an old issue where zip codes had to be entered exactly matching what's in the zipship configuration.
For example, if you used the zip code 59701 in one zone and the zip code 59711 in another zone, but the customer entered 59701-8208, the customer gets a notice that you are not shipping to that area. Adding the substring check fixes this for US ZIP codes where most people will only use the 5 digit, but some use the 9 digit ZIP+ code.
(So, the fix you commented out addresses a different issue that I encountered very shortly after installing this on a site years ago...)
-
4 Attachment(s)
Re: ZipShip - Support Thread
ZC 1.5.7 with one page checkout and Bootstrap.
For the love of ..., I can't get it to work.
I set my zones as follow:
Zone 1 Zip Codes
94939
Zone 1 Shipping Table
9999:9.99
Zone 1 Handling Fee
0
Zone 2 Zip Codes
94901,94903,94904
Zone 2 Shipping Table
9999:12.99
Zone 2 Handling Fee
0
Zone 3 is blank
I am getting the "Sorry, we are not shipping to your region at this time." no matter which zip codes i try.
If i set zone 3 like this
Zone 3 Zip Codes
Zone 3 Shipping Table
999:14.99
Zone 3 Handling Fee
0
The shipping default to $14.99 no matter which zip i enter in the shipping address.
I am no getting any errors logs or anything.
What am I doing wrong? Any help on figuring this out would be appreciated?
Thank you
P.S: I noticed the zip code gets truncated in the shipping method box and shopping cart. (i.e: Deliver To Zipcode: 9493).
If i change the delivery address zip code on the checkout page from 94939 to 94903 , the Zip Code display in shipping method changes but the zip in the shopping cart box remains to 9493.
Attachment 20453
Attachment 20454
Attachment 20455
-
Re: ZipShip - Support Thread
Set Configuration :: Minimum Values :: Post Code to 5 (it defaults to 4).
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Set Configuration :: Minimum Values :: Post Code to 5 (it defaults to 4).
wow now i feel really "dumb" and want to go hide in a deep hole. :bangin:
Thanks lat9 for rescuing me as always
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
nicksab
wow now i feel really "dumb" and want to go hide in a deep hole. :bangin:
Thanks lat9 for rescuing me as always
Happy to have helped. I'll note that I ran into this in the initial update for the shipping module as well!
-
Re: ZipShip - Support Thread
I am facing another issue.
Module works as intended but i am getting these warning log:
Code:
[19-Jan-2024 11:05:34 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 107.119.57.1
#1 trigger_error() called at [/includes/modules/shipping/zipship.php:186]
#2 zipship->getQuote() called at [/includes/modules/shipping/zipship.php:108]
#3 zipship->quote() called at [/includes/classes/shipping.php:174]
#4 shipping->quote() called at [/includes/modules/bootstrap/shipping_estimator.php:159]
#5 require(/includes/modules/bootstrap/shipping_estimator.php) called at [/includes/templates/bootstrap/modalboxes/tpl_shipping_estimator.php:19]
#6 require(/includes/templates/bootstrap/modalboxes/tpl_shipping_estimator.php) called at [/includes/templates/bootstrap/templates/tpl_shopping_cart_default.php:178]
#7 require(/includes/templates/bootstrap/templates/tpl_shopping_cart_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:213]
#8 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:95]
--> PHP Warning: Missing cost (MODULE_SHIPPING_ZIPSHIP_COST_) or handling (MODULE_SHIPPING_ZIPSHIP_HANDLING_) settings; zipship is disabled. in /includes/modules/shipping/zipship.php on line 186.
[19-Jan-2024 11:05:34 America/Los_Angeles] Request URI: /index.php?main_page=shopping_cart, IP address: 107.119.57.1
#1 require(/includes/templates/bootstrap/templates/tpl_modules_shipping_estimator.php) called at [/includes/modules/bootstrap/shipping_estimator.php:300]
#2 require(/includes/modules/bootstrap/shipping_estimator.php) called at [/includes/templates/bootstrap/modalboxes/tpl_shipping_estimator.php:19]
#3 require(/includes/templates/bootstrap/modalboxes/tpl_shipping_estimator.php) called at [/includes/templates/bootstrap/templates/tpl_shopping_cart_default.php:178]
#4 require(/includes/templates/bootstrap/templates/tpl_shopping_cart_default.php) called at [/includes/templates/bootstrap/common/tpl_main_page.php:213]
#5 require(/includes/templates/bootstrap/common/tpl_main_page.php) called at [/index.php:95]
--> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /includes/templates/bootstrap/templates/tpl_modules_shipping_estimator.php on line 113.
Any suggestions on this please?
-
Re: ZipShip - Support Thread
Did you modify the shipping-module's number of zones (defaults to 3)?
Have you provided a default/fall-back entry if the order's zip-code matches none of the other configured groups?
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Did you modify the shipping-module's number of zones (defaults to 3)?
No I am only using 3 zones with the following setting:
Quote:
Zipcode-Based Rate
Enable Zip Code Method
True
Calculation Method
Item
Tax Class
Taxable Goods
Shipping Zone
--none--
Sort Order
0
Zone 1 Zip Codes
94939,94925,94904,94957
Zone 1 Shipping Table
5:11.99,99:14.99
Zone 1 Handling Fee
0
Zone 2 Zip Codes
94920,94941,94942,94901,94903
Zone 2 Shipping Table
5:14.99, 99:19.99
Zone 2 Handling Fee
0
Zone 3 Zip Codes
94965,94960
Zone 3 Shipping Table
5:19.99,99:24.99
Zone 3 Handling Fee
0
Quote:
Have you provided a default/fall-back entry if the order's zip-code matches none of the other configured groups?
No and honestly not sure how to do that. Meaning we don t serve any other zip except for the one provided above.
If the delivery address zip code is not served, i have the "Not available at this time" and checkout cannot be completed. I am assuming that s what is creating the log.
it is working as intended so far except for the logs. I saw "00000" mention for all zip codes but that won t work since we only ship to a limited amount of zip code.
-
Re: ZipShip - Support Thread
So if I understand correctly, these logs are generated because if the billing/shipping address zip entered does not match the one i specified and the message appears.
hypothetically, if we don t serve zip code: 11111, the error logs gets generated and the " not available at this time" get displayed.
So that could be confusing to customer.
How can i do this instead: If the zip is outside of our serving area, a message is displayed asking customer to check shipping address in order to continue??
the best would be to have the shipping address separate from the billing address instead of being "auto fill". (if that makes sense)
I look into this option at some point but was never able to figure it out.
-
Re: ZipShip - Support Thread
FWIW, I'm working on an update tested on zc158/zc200 that should correct those issues and updates to support PHP 8.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
FWIW, I'm working on an update tested on zc158/zc200 that should correct those issues and updates to support PHP 8.
That sounds promising. Thank you for the hard work.
Turning off shipping estimator has stopped the error from getting generated. Until i figure i out, i will revert to the flat fee rate and keep this on the side burner for now
-
Re: ZipShip - Support Thread
ZipShip v3.1.0 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=312
This release contains changes associated with these GitHub issues:
#12: Major update for zc158/zc200 and PHP versions >= 8.2
#13: Use matching zipcode values instead of string comparisons
#14: Correct PHP Warning: strpos empty needle
Read the full readme.html here: https://htmlpreview.github.io/?https...ip/readme.html
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Thank you lat9 for this release.
I saw that it requires ZC 1.5.8 but i got to ask: Would it work with 1.5.7?
I am not quite ready for 1.5.8 yet unfortunately.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
nicksab
Thank you lat9 for this release.
I saw that it requires ZC 1.5.8 but i got to ask: Would it work with 1.5.7?
I am not quite ready for 1.5.8 yet unfortunately.
I've not tested on zc157. ZipShip might work (in conjunction with PHP 7.4 or later), but I will not expend time debugging any zc157-only issues.
-
Re: ZipShip - Support Thread
Thanks for the update to this plugin - very timely for myself as I am ready for 158.
I did have an issue though.
I actually split some of my postcodes by adding A or B to them on some occasions - generally when a postcode covers a large area and I want to offer different rates to different suburbs with a postcode.
eg, 6056,6056A,6056B,6055b,6112A,6164A,6126,6172,6173,6174,6175,6176,6027,6077,6166A ,6025,6110
And for example if I am looking for 6164A, but 6164 appears earlier in the table, then the function checkForMatch was prematurely finding a match.
This is corrected (for me) by amending this line -
if ($next_zone !== '' && strpos($dest_zipcode, $next_zone) === 0) {
to
if ($next_zone !== '' && strpos($next_zone, $dest_zipcode) === 0) {
-
Re: ZipShip - Support Thread
v3.1.1 of ZipShip is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=312
This release corrects issue #15 (Intervening whitespace in zipcode lists result in no-match-found, no quote)
-
1 Attachment(s)
Re: ZipShip - Support Thread
Hi,
I've been struggling with updating my Zencart for about 3 weeks now. When I fix one thing another seems to break. Currently I am getting this in the logs after i go to the checkout page :
Undefined constant "MODULE_SHIPPING_ZIPSHIP_ZONE" in /home3/genesbea/public_html/includes/modules/shipping/zipship.php:77
Anybody got any ideas as to what is going on here please?
Thanks
PS My ZenCar version is currently : 1.5.8a/ The ZipShip version is 3.1 As suggested I have uploaded an image of the settings in my Modules section.Attachment 20586
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
rkhan3366
Hi,
I've been struggling with updating my Zencart for about 3 weeks now. When I fix one thing another seems to break. Currently I am getting this in the logs after i go to the checkout page :
Undefined constant "MODULE_SHIPPING_ZIPSHIP_ZONE" in /home3/genesbea/public_html/includes/modules/shipping/zipship.php:77
Anybody got any ideas as to what is going on here please?
Thanks
PS My ZenCar version is currently : 1.5.8a/ The ZipShip version is 3.1 As suggested I have uploaded an image of the settings in my Modules section.
Attachment 20586
Interesting, any idea what version of ZipShip you upgraded from?
To correct your issue, navigate to your admin's Tools :: Install SQL Patches and run this query to add that missing setting:
Code:
INSERT INTO configuration
(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added)
VALUES
('Shipping Zone', 'MODULE_SHIPPING_ZIPSHIP_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', 6, 6, 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now());
-
Re: ZipShip - Support Thread
v3.1.2 of ZipShip is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=312
This release renames the module's language file to lang.zipship.php; required for zc210 interoperability.
-
1 Attachment(s)
Re: ZipShip - Support Thread
Hello,
I've been using this amazing plugin for a few years and in the process of getting latest version to work with ZC 2.0.1 on my test site. Can't get it to appear as a shipping option and there are no error logs.
Attachment 20777
Any suggestions of how to troubleshoot?
Thanks,
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
allmart
Hello,
I've been using this amazing plugin for a few years and in the process of getting latest version to work with ZC 2.0.1 on my test site. Can't get it to appear as a shipping option and there are no error logs.
Attachment 20777
Any suggestions of how to troubleshoot?
Thanks,
Er, it's showing up as the next-to-last shipping module in that screenshot.
-
Re: ZipShip - Support Thread
Quote:
Originally Posted by
lat9
Er, it's showing up as the next-to-last shipping module in that screenshot.
Sorry for being unclear, it is not appearing at checkout as a shipping option
-
Re: ZipShip - Support Thread
The shipping module will only show up on the storefront when the ship-to zipcode is present in the module's configured list.