- Posts: 50
- Thank you received: 4
State field mandatory when set to not required
5 years 1 week ago #337195
by infinityb
State field mandatory when set to not required was created by infinityb
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
Since version 4.4.3, I think, the state field has been mandatory on the checkout even when it is not set to required.
-- Joomla version -- : 3.10.3
Since version 4.4.3, I think, the state field has been mandatory on the checkout even when it is not set to required.
Please Log in or Create an account to join the conversation.
5 years 1 week ago #337228
by nicolas
Replied by nicolas on topic State field mandatory when set to not required
Hi,
Thanks for the report.
I was able to reproduce the issue on my end.
It's because the "please select" choice is not properly taken into account.
Add the code:
after the line:
in the file administrator/components/com_hikashop/classes/field.php and it will fix the problem.
We'll add the fix on our end for the next version.
Thanks for the report.
I was able to reproduce the issue on my end.
It's because the "please select" choice is not properly taken into account.
Add the code:
Code:
if(!empty($field->field_options['pleaseselect'])) {
$states[''] = '';
}
Code:
$states = $countryType->load();
We'll add the fix on our end for the next version.
The following user(s) said Thank You: infinityb
Please Log in or Create an account to join the conversation.
Time to create page: 0.044 seconds