Shipping address without "State" is rejected

  • Posts: 26
  • Thank you received: 3
  • Hikashop Business
4 years 5 months ago #320811

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3
-- Browser(s) name and version -- : Firefox latest
-- Error-message(debug-mod must be tuned on) -- : Shipping address incorrect, please edit

Hi Guys,

After the update to Hikashop (Buss) 4.3.0 an existing customer from Singapore could no longer complete the checkout process.
The shipping address does not contain a "State" (Singapore does not have any states or provinces).

Customer tried to enter a new shipping address and reports (and we confirmed) that after selecting Singapore as a country the "State" label still shows, but the field itself disappears.
After the AJAX does its thing a message appears saying that shipping is not possible to this address as some fields are missing and please edit.

When I checked there was for Singapore only the "Country" zone
I circumvented the problem by creating extra zones for Singapore. I duplicated the "Country" zone for both "State" and "Ship" and added the State as subzone to the country. (ref. attachment)
Now it works again.
Since this issue may apply to other countries (without states or provinces) as well I would like to understand what is happening here.
Did I miss something in the release notes?
This was not a problem in the previous version of Hikashop.

What would currently be the correct way to set things up for countries where states or provinces do not apply?

Thank you so much for your insights.

Cheers,
André

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 5 months ago #320827

Hi,

Thank you for your feedback.

This happens because of an improvement we made in the 4.3.0 so that if you activate the "required" setting of a custom address field, the system will check that the custom field is filled in when the address is selected as a billing or shipping address on the checkout. Before the system was allowing customers to checkout even without the field filled in as long as the address had been entered before the required option had been activated.
And we didn't think of the state custom field, which is by default required and there are by default some countries without states.
So I've added a patch so that if the country doesn't have any states, even if the "required" setting of the custom field is activated, it will still validate the address.
You can download the install package of HikaShop on our website and install it on yours to get the patch.
Note that you can also just turn off the "required" setting of the state field. Unless you have the "Add a 'Please select' value" setting activated in the field, having the required setting on or off is the same (besides that extra check that we need to do to skip the field when no states are in the country if the setting is turned on).

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

Time to create page: 0.055 seconds
Powered by Kunena Forum