S03e08 - Country / State Selector QUESTIONS/SUPPORT
- mhsuffolk
- Contributor
- Posts: 199
- Joined: Sat Oct 26, 2019 9:13 am
- Phoenix Version: v1.1.0.6
- Has thanked: 12 times
- Been thanked: 11 times
- mhsuffolk
- Contributor
- Posts: 199
- Joined: Sat Oct 26, 2019 9:13 am
- Phoenix Version: v1.1.0.6
- Has thanked: 12 times
- Been thanked: 11 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
Found the problem.
I do not use the "State" Customer Data module.
In the Country State Selector module I had set the Require input to False. As I am not using the State CD module I thought having it set to True might cause a conflict.
I have discovered that if I set this to True then the default country works correctly.
I do not use the "State" Customer Data module.
In the Country State Selector module I had set the Require input to False. As I am not using the State CD module I thought having it set to True might cause a conflict.
I have discovered that if I set this to True then the default country works correctly.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
The use of States (counties) in U.K. is a weird one, that is, no requirement for them on postal addresses but there is a dependency on them for some modules.
- mhsuffolk
- Contributor
- Posts: 199
- Joined: Sat Oct 26, 2019 9:13 am
- Phoenix Version: v1.1.0.6
- Has thanked: 12 times
- Been thanked: 11 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
Yes I agree.
I only use Royal Mail which as you say do not use them.
Couriers like DPD do use them but I try to avoid confusing customers by not showing them the field.
I only use Royal Mail which as you say do not use them.
Couriers like DPD do use them but I try to avoid confusing customers by not showing them the field.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
Using this on PHP 8+ does sometimes trigger a notice:
from:to:
That's a notice, not an error - it still works - but in this case, change /ext/scripts/stateSelector.php line 17PHP message: PHP Warning: Undefined array key "HTTP_X_REQUESTED_WITH" in /ext/scripts/stateSelector.php on line 17;
PHP message: PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /ext/scripts/stateSelector.php on line 17
from:
Code: Select all
if (!strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') {
Code: Select all
if (!(strtolower($_SERVER['HTTP_X_REQUESTED_WITH'] ?? '') === 'xmlhttprequest')) {
-
Omar_one
- Senior Contributor
- Posts: 676
- Joined: Fri Oct 25, 2019 5:06 pm
- Phoenix Version: v1.0.8.16
- Has thanked: 100 times
- Been thanked: 56 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
on the last version S03e08-1.1.0.0 the Allowed Countries function missing
Code: Select all
'MODULE_HEADER_TAGS_COUNTRY_STATE_SELECTOR_ALLOWED_COUNTRIES' => [
'title' => 'Allowed Countries',
'value' => '',
'desc' => 'Allowed List of Countries in addition to the Default Country. Or leave Blank for all countries.',
'use_func' => 'cs_show_countries',
'set_func' => 'Config::select_multiple(Country::fetch_options(), ',
],Code: Select all
function cs_show_countries($text) {
return nl2br(implode("\n", array_map('Country::fetch_name', explode(';', $text))));
}
Last edited by Omar_one on Tue Oct 28, 2025 9:41 pm, edited 1 time in total.
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: S03e08 - Country / State Selector QUESTIONS/SUPPORT
This was removed as you now have the possibility to turn off countries in admin.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.