Zen Cart Logo
Forums / Bug Reports / Shipping Estimator country selection not working

Shipping Estimator country selection not working

Views: 9,664

Results 1 to 15 of 15
03 Apr 2019, 12:04
#1
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Shipping Estimator country selection not working

Hi, I do not know if it's a bug, Shipping Estimator Display Settings for Shopping Cart, if I select 1 estimate with popup and I change country it works, on the other hand if Shipping Estimator Display Settings for Shopping Cart I chose 2 display shipping costs in shopping cart page and I chose a country it does not work it always stays with the country of the store.

03 Apr 2019, 15:23
#2
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

You can see here in this demo http://www.zcadditions.com/bootstrap_tpl_demo/
in shopping cart change of country it always returns united states.

03 Apr 2019, 17:43
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipping Estimator country selection not working

What modifications (or other software installed) have been applied to the site? I am not able to reproduce this with a ZC 1.5.6 site other than the sample shown.

03 Apr 2019, 19:04
#4
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

It is a fresh installation just a template, but even with the classic templates the problem exists, there are no plugins installs

03 Apr 2019, 19:08
#5
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Shipping Estimator country selection not working

Do you have shipping methods setup to other countries than the US?

03 Apr 2019, 20:09
#6
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

I have no shipping methods, I only have one country for none, but a 1.5.6 zencart demo with shipping costs on the shopping cart page is not online?
Sorry, but the site that I put is not mine, I am working in localhost on the PC, I put that site because it has the same problem and is set with the display of shipping costs on the cart page, and not in a window. I have installed a dozen countries, but each time it does not take the country it remains with the country of the store

03 Apr 2019, 20:11
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipping Estimator country selection not working

Php version?
Mydebug logs in the logs folder?

There are some updates that have been applied to includes/modules/shipping_estimator.php to account for stricter php requirements.

03 Apr 2019, 20:27
#8
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

php 7.2

with php 7.3 I have errors
[03-Apr-2019 22:20:19 Europe/Brussels] Request URI: /index.php?main_page=shopping_cart, IP address: ::1
#1 mysqli_connect() called at [/Applications/MAMP/htdocs/MYSITE/includes/classes/db/mysql/query_factory.php:64]
#2 queryFactory->connect() called at [/Applications/MAMP/htdocs/MYSITE/includes/init_includes/init_database.php:22]
#3 require(/Applications/MAMP/htdocs/MYSITE/includes/init_includes/init_database.php) called at [/Applications/MAMP/htdocs/MYSITE/includes/autoload_func.php:48]
#4 require(/Applications/MAMP/htdocs/MYSITE/includes/autoload_func.php) called at [/Applications/MAMP/htdocs/MYSITE/includes/application_top.php:170]
#5 require(/Applications/MAMP/htdocs/MYSITE/includes/application_top.php) called at [/Applications/MAMP/htdocs/MYSITE/index.php:26]
--> PHP Warning: mysqli_connect(): (HY000/2002): No such file or dir

it is a clean installation, the proof is the site demo online de rbarbour has the same problem.

There is not a site with zen cart 1.5.6 online to see if it's a bug or not

05 Apr 2019, 11:19
#9
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipping Estimator country selection not working

I'm sorry, but that error doesn't make sense to me. Mysqli_connect doesn't involve a file of Zen Cart, meaning it doesn't try to access a Zen Cart file so don't know how or why it is reporting: no such file or dir...

That said, did a search for "mysqli_connect HY000/2002 no such file or dir" and came up with several results associated with an inability to connect with the database server. The solutions seen include ensuring a correct reference to the database server, the correct port is used/identified, that the service is running or been restarted, etc...

Is this the error/response that occurs every time the shopping cart page is reloaded after making a country selection on the page and updating?

As to potential other issues, as said there were some other corrections applied after ZC 1.5.6a was released that affect this method of evaluating shipping options. The results of those (and other modifications) can be seen in the current github version of ZC 1.5.6: https://github.com/zencart/zencart/tree/v156

As I recall for a customer not logged in, files modified for more strict php requirements included:
includes/modules/shipping_estimator.php
includes/modules/pages/checkout_shipping/header_php.php
includes/classes/order.php

These and the other files modified seem to be covered by the following Pull Requests:
https://github.com/zencart/zencart/pull/1951/files
https://github.com/zencart/zencart/pull/1952/files
https://github.com/zencart/zencart/pull/2031/files
https://github.com/zencart/zencart/pull/2165/files

There are a few others regarding shipping modules and the absence of "proper" response, though not sure that those apply at the moment.

As to other sites with Zen Cart 1.5.6aish installation? They are out there and as I said the one(s) that I have do not currently have this issue, though they include the updated code as available on github and any other corrections that have been in-house identified but not yet shared with the github location.

05 Apr 2019, 12:07
#10
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

Thank you for your answer, all files are updated, even with a new installation there is the problem. the connection to the mysql server is just the whole site works except when i want to update the country for shipping costs. In the demo online of zen cart we can not see the eurreur because the price estimate is done on another page (pop window) and not on the poage of the cart.

05 Apr 2019, 12:33
#11
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

sorry, with the fault templates it works.

05 Apr 2019, 14:27
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipping Estimator country selection not working

diamond1:

Thank you for your answer, all files are updated, even with a new installation there is the problem. the connection to the mysql server is just the whole site works except when i want to update the country for shipping costs. In the demo online of zen cart we can not see the eurreur because the price estimate is done on another page (pop window) and not on the poage of the cart.
I was going to ask if this issue occurred before deleting countries as identified in this forum thread: https://www.zen-cart.com/showthread.php?225293-delete-a-country-in-admin-does-not-work
diamond1:

sorry, with the fault templates it works.
But in post #4 said that the classic template(s) didn't work either.

So, if that is the case, may recommend that regarding this template to look to see that the html properly validates and that the country selector is found within the form associated with updating the estimate and/or what overrides it uses to present the page as there likely is something involved.

05 Apr 2019, 16:06
#13
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

thank you Mc12345678, no the problem came from the templates of the file tpl_shopping_cart_default.php is resolved now we make a merge with the original file

05 Apr 2019, 16:45
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Shipping Estimator country selection not working

diamond1:

thank you Mc12345678, no the problem came from the templates of the file tpl_shopping_cart_default.php is resolved now we make a merge with the original file
Welcome.

If haven't yet, could help the owner of the site referenced earlier in this thread know about the problem they seem to be having with their site as well.

They may have done something on purpose or it could be accidental, but I'm sure they would appreciate knowing about the issue.

05 Apr 2019, 18:14
#15
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Shipping Estimator country selection not working

Yes of course.