State field mandatory when set to not required

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 6 days ago #337195

-- 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.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 days ago #337228

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:

if(!empty($field->field_options['pleaseselect'])) {
						$states[''] = '';
					}
after the line:
$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.042 seconds
Powered by Kunena Forum