Skip to main content

State field mandatory when set to not required

5 years 1 week ago #337195 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.

Please Log in or Create an account to join the conversation.

5 years 1 week ago #337228 by nicolas
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:
Code:
if(!empty($field->field_options['pleaseselect'])) { $states[''] = ''; }
after the line:
Code:
$states = $countryType->load();
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.
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
Powered by Kunena Forum