Zone Rates

Views: 7,668

Results 1 to 20 of 23
16 Mar 2023, 3:35 AM
#1
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Zone Rates

https://www.tecnikit.com/catalog/index.php?main_page=index
Version: 1.5.8
MySQL 8

If I am not mistaken, Zone Rates creates a confusion with the rates by ZONES.

From what I see, the module rates by ZONES are actually rates by COUNTRY GROUPS. Ok, zones at all.

But in ZENCART, ZONES are provinces or regions of each country. Thus, if one creates SUBZONES to indicate different taxes or rates, cannot be used in these rates.

I need different taxes/ shipping prices both by groups of countries ( could be use the module ZONE RATES ), but in a specific case, by regions ( REAL ZENCHART ZONES ) of the same country.

I tried to create SUBZONES as groups of ZENCART ZONES / ZENCART COUNTRIES. But this is the problem. Can't be called from the module ZONE RATES.

How can I structure this ?

Thank you.

16 Mar 2023, 11:04 AM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Zone Rates

You are correct that the built-in Zones shipping module is based on countries, not regions within countries.

Check the Zone Rates Clone plugin and see if that meets your needs.
https://www.zen-cart.com/downloads.php?do=file&id=977

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Mar 2023, 4:51 PM
#3
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

swguy:

You are correct that the built-in Zones shipping module is based on countries, not regions within countries.

Check the Zone Rates Clone plugin and see if that meets your needs.
https://www.zen-cart.com/downloads.php?do=file&id=977

Thanks for answering so quickly.

I incremented yesterday the NUMZONE in the ZONE RATES module, to add more groups of countries as the transport company uses. This is perfect for group the countries as their rates.

If I am following right the flow, the CLONE ZONE RATES would add more groups of countries what not solve the problem of regions only of 1 country.

This is... what could solve the problem is to clone the TABLE RATE for different groups of regions of same country. Not to clone ZONE RATES that adds more options only for countries, not for regions.

As example, the TAX RATES does exactly with the taxes, what I need to do with the shipping rates. I can create groups of regions of 1 country, or groups of countries.

If I'm not mistaken, is there another way ?

16 Mar 2023, 5:00 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Zone Rates

The Zone Rates Clone goes down to the Zone Definition (Geo Zone) level. I think this will do what you want.

a) Create a Zone Definition with the regions you want:
https://docs.zen-cart.com/user/locations/zone_definitions/

b) Try the Zone Rates clone, and add those Zone Definitions.

Then test carefully.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 Mar 2023, 3:29 AM
#5
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

I have the spanish module installed. I change in Admin to english.

I installed the table rates clone and the right screen where the detail of the shipping modes was opened disappeared.

I saw that the modules were installed when it was installed.

No problem, I restore backup copies of the web and the database and everything is fine again.

I first uninstall the modules zone rates and rate tables.

I install again the zone tarif clone and then the same thing happens again. I see that I do not have the files in the directories indicated by the installation:

*"the files:
/includes/modules/shipping/zones1.php
/includes/modules/shipping/zones2.php
/includes/modules/shipping/zones3.php
/includes/modules/shipping/zones4.php
/includes/modules/shipping/zones5.php

and the files:
/includes/languages/english/modules/shipping/zones1.php
/includes/languages/english/modules/shipping/zones2.php
/includes/languages/english/modules/shipping/zones3.php
/includes/languages/english/modules/shipping/zones4.php
/includes/languages/english/modules/shipping/zones5.php

will be added to your files."
*

I change to Admin in spanish. The detail block of the shipping methods appears again. But when I install the modules from there (in Spanish), I don't see any changes compared to the non-cloning mode.

I reactivate the Admin in English and the detail part of the shipping methods disappears from the screen again.

mysql 8
Version 1.5.8

17 Mar 2023, 10:15 AM
#6
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zone Rates

I'm not really following what you are doing regarding shipping as I use Advanced Shipper for everything.

But, if you are using the spanish language pack:

  1. Always use the version from GitHub and watch the repository to get notifications about bugs.
  2. When you add anything to your site that has additional /english language files, you must mirror the same files in /spanish. And you will have to convert them to utf-8 once you have an accented character in them.

Please contribute your improvements!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

18 Mar 2023, 7:30 PM
#7
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

I can't find the ZONES ( regions of countries ) in the SQL database. In any case the rest are in UTF8.
When I copy the updated english php files to the spanish directory, the effect then is that the faill happens in both languages. Not only in english:

Attachment 20232

Then I can't reinstall the zone modules.

18 Mar 2023, 7:53 PM
#8
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zone Rates

...and no debug logs?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

18 Mar 2023, 8:47 PM
#9
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

torvista:

...and no debug logs?

"modules.php","set=shipping&module=table&action=remove","0","","Accessed page [modules.php] with action=remove. Review page_parameters and postdata for details.","Array<br />

"modules.php","action=removeconfirm&set=shipping","0","","Accessed page [modules.php] with action=removeconfirm. Review page_parameters and postdata for details.","stdClass Object<br />

camefrom=modules.php&set=shipping&module=table","0","","Accessed page [login.php] with action=do2f19a4b2bb5060f55d1580a4fa45ebad. Review page_parameters and postdata for details.","stdClass Object<br />

"camefrom=index.php","0","","Accessed page [login.php] with action=do41cbd91ee8018c74858aad176ef19f74. Review page_parameters and postdata for details.","stdClass Object

Can be this ?

18 Mar 2023, 9:03 PM
#10
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

I found the zones table.

Reviewed tables countries, zones and zones to geo_zones. All status ok.

I copy too the INCLUDE from the update to the ADMIN directory too. ( english and spanish ). No changes.

18 Mar 2023, 9:42 PM
#11
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Zone Rates

@JPVV you are showing an access log. The debug log which @torvista is asking for is a file created in your /logs folder when there's a blank or partial blank screen. See

https://docs.zen-cart.com/user/troubleshooting/debug_logs/

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

19 Mar 2023, 1:40 AM
#12
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

swguy:

@JPVV you are showing an access log. The debug log which @torvista is asking for is a file created in your /logs folder when there's a blank or partial blank screen. See

https://docs.zen-cart.com/user/troubleshooting/debug_logs/

Thank you !! 38 years as software bussiness developper but totally noob for PHP / ZENCART.

Yes, there are much logs about problems keeping the old domain name that I used as test site. I did a clean installation in the new domain and changed all the files under the root with the old domain name. And was changed in the admin screens. Searching the old name NOW in all the files only appeared in 2 links without importance. But seems that the database must contain that domain in some place.

I have the old site as backup of first steps shop ( old version ). I will erase the old site to force faillures as not found and Let me view.

19 Mar 2023, 5:03 PM
#13
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

1- Restored database from point where zone table / zone rates was running fine. ( For both cases english / spanish ). With the countries / zones untouched as they came from the clean installation / spanish language update.
2- Restored web from same point.
3- Changed the 2 bad links ( only 2 bad links in rich text of text information in the home page )
4- Enter as normal user. All right. No logs.
5- Enter as admin I can see the admin's page normal and I can uninstall the ZONE TABLE / ZONE RATES modules from shipping options.
6- I copy the ENGLISH part of the ZONE RATES CLONE MODULE for the spanish case prior to install.
6- I upload the files to the site.
7- The same. RIGHT part of screen in blank.

Error logs, various of same type:
--> PHP Fatal error: Uncaught Error: Undefined constant "MODULE_SHIPPING_ZONETABLE_SORT_ORDER" in /srv/vhost/tecnikit.com/home/html//includes/modules/shipping/zonetable.php:71
Stack trace:
#0 /srv/vhost/tecnikit.com/home/html/
/admindir/modules.php(187): zonetable->__construct()
#1 /srv/vhost/tecnikit.com/home/html//admindir/index.php(11): require('/srv/vhost/tecn...')
#2 {main}
thrown in /srv/vhost/tecnikit.com/home/html/
/includes/modules/shipping/zonetable.php on line 71.

22 Mar 2023, 12:56 PM
#14
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

Did you see the upper message ? Am I making something wrong or happens something with this module ?

Thank you

22 Mar 2023, 3:18 PM
#15
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Zone Rates

Check the **install **method in your **zonetable **shipping module. Based on the error message, I'm guessing that the *configuration_key *values that are being set still start with MODULE_SHIPPING_ZONES_ instead of MODULE_SHIPPING_ZONETABLE_

24 Mar 2023, 2:17 AM
#16
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

Before trying to understand ( and try again ) why that problem happens if those modules were disabled, I checked again if this clone will solve the administrative problem. And I see no.

I understand that you recommended it because with the clone you can define a different tax for each clone. But there is still the problem of variations in the shipping amount by country/countries but for regions.

As example, if you send from UK to Man Island, you have a special shipping cost. And to Gibraltar a diferent shipping cost and tax rate.

I need ( are conditions imposed by the authorities and the transport company ):

Country ES region islands A - Tax type 1 - Shipping cost 1
Country ES region islands B - Tax type 2 - Shipping cost 2
Country ES region islands C - Tax type 3 - Shipping cost 3
Country ES rest of regions - Tax type 3 - Shipping cost 4
Intra-community countries zone E- Tax type 4 - Shipping cost 5
Intra-community countries zone F- Tax type 4 - Shipping cost 6
Out of EU countries zone G - Taxtype 5 - Shipping cost 7
Out of EU countries zone H - Taxtype 5 - Shipping cost 8
Out of EU countries zone **I **- Taxtype 5 - Shipping cost 9

As you see, the zone rates clone can't solve this. Probably an intermediate table with index country/zone/subzone could solve this and all cases but....

Is there a way to do this ?

Thank you.

25 Mar 2023, 7:48 AM
#17
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zone Rates

Just get Advanced Shipper. I'm in Spain, been using it for 12 years, and have never touched the core shipping modules.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

25 Mar 2023, 2:07 PM
#18
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

Thank you very much Steve. I think we are close, I now live in Pontevedra.

The idea of ​​using Zencart was to have a zero cost since the result of my type of business is unknown. I'm trying something and if it doesn't work, of course I will use your sollution.

I have cloned the zones_to_geo_zones table with another name to not alter the structure of Zencart, adding a new field for the price. It is as simple as each defined area has a different transport price, and that's it.

I'm now looking how to implement it in the PHP code, since I haven't used PHP until getting into Zencart. The problem is time, so I'm not going to do a dataentry. The data will be entered by the SQL table editor and that's it.

Javier Povedano

25 Mar 2023, 3:56 PM
#19
jpvv avatar

jpvv

New Zenner

Join Date:
Feb 2023
Location:
Spain
Posts:
28
Plugin Contributions:
0

Re: Zone Rates

Ok, bad idea. Too much code to change. Not only for the calculations, for web-db conectivity, modules conections.... I will use the module that you say.

Thank you !!

13 Jun 2024, 1:38 PM
#20
siilike1232 avatar

siilike1232

New Zenner

Join Date:
Mar 2011
Posts:
56
Plugin Contributions:
0

Re: Zone Rates

torvista:

Just get Advanced Shipper. I'm in Spain, been using it for 12 years, and have never touched the core shipping modules.

Could you please post a link to the Advanced Shipper you had in mind?