Conditional fields on new address

  • Posts: 117
  • Thank you received: 3
6 years 2 months ago #298048

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.12
-- PHP version -- : 7.0.31

I have some conditional fields. A radio field that have an option that show/hide another field if selected or not. Both fields are required. In the registration process thei work as intended (if I select the option in the first field than the second field is shown) meanwhile during the checkout process or even on user account managing address all the fields are displayed soon.

Maybe a bug...

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 2 months ago #298056

Hi,

First please check with the default template of Joomla and check if you have a javascript error in the console of your browser when you reproduce the problem.
Because it's likely that it comes from something else messing with the javascript to handle the hide/display system of the custom fields on the page where it doesn't work.
Also, please provide a link to the page where it doesn't work and instructions to reproduce the issue.

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

  • Posts: 86
  • Thank you received: 4
  • Hikashop Business
6 years 1 month ago #299384

Evening Nicolas,

I have the same problem on the Cpanel page, checkout and registration pages are working fine.

On the edit or new address page the toggle function for the custom fields is not working and by default all options are displayed.

I did try to compare the address/show.php with the checkout/show_block_address.php but did not find the cause of the problem.

I also did disable all plugins, some other software and did try the Protostar template but the problem is the same.

The only (small) problem I find on the checkout page is the error message generated if there is no shipping address. If the shipping address is missing the error message does not give a clear indication that it concerns the missing shipping address, it only mentions that no valid shipping method could be found.

I think that the problem already did occur in Hikashop version 3.5.1 but form some reason I did not notice it until now.

If you need the login information just let me know.

Regards, Rene

HikaShop Business: 4.0.0 (20.10.2018)
Joomla 3.8.13

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

  • Posts: 12953
  • Thank you received: 1778
6 years 1 month ago #299406

Hello Rene,

Can you show us some screenshots of :
- the issue that you are having
- the configuration page of custom fields which are not working properly ?

Thank you !
Kind regards,
Mohamed Thelji.

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

  • Posts: 86
  • Thank you received: 4
  • Hikashop Business
6 years 1 month ago #299424

Afternoon Mohamed,

please see the attached images, the checkout images are as it should be the Cpanel has the problem that the conditional fields are not working.

I did not include the checkout error message, but if there is no shipping address or the product weight is not found in the shipping tables the error message is the same.

If you need more just let me know.

Regards, Rene

Attachments:

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
6 years 1 month ago #299482

Hi,

Thank you for that.
I was able to reproduce the problem and add a patch for it on our end.
The issue came from the address/show.php where the code:

id="hikashop_user_address_<?php echo $this->address->address_id; ?>_<?php echo $fieldname;?>"
should actually be:
id="hikashop_address_<?php echo $fieldname; ?>"
This lead to the javascript toggle system to not find the rows to hide/display and thus they were left always displayed.
If you have HikaShop 4, you can just download the install package on our website and install it on yours again to get the patch.

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

  • Posts: 86
  • Thank you received: 4
  • Hikashop Business
6 years 1 month ago #299492

Afternoon Nicolas,

thank you and thank you Mohamed, problem solved!

Regards, Rene

Last edit: 6 years 1 month ago by EnerW.

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

Time to create page: 0.094 seconds
Powered by Kunena Forum