Product Options Checkbox adding to cart regardless of checked

  • Posts: 6
  • Thank you received: 2
1 day 6 hours ago #372532

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 5.4.7
-- PHP version -- : 8.4.23

Hello, I'm running into a strange issue on two sites that have a few products with an option set under Specifications. I have Display > Product Options > Product Selection Method set to "checkbox," and the option is added to the cart regardless of whether it's checked on the product page. Changing this setting to "single dropdown" seems to clear the issue and functions as intended. I can also uncheck the option in the cart's edit screen to remove it.

I'm wondering if the checkbox on the cart's edit screen defaults to "checked" regardless of the customer's choice, but I'm not 100% certain. I also switched to the Cassiopeia template to rule out Gantry and the Chimera theme, but got the same result.

Any help would be greatly appreciated. Thank you!

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

  • Posts: 85838
  • Thank you received: 14101
  • MODERATOR
1 day 2 hours ago #372533

Hello,

Thank you for the clear report, we were able to reproduce it and it is indeed a bug that was present in 6.5.0.

In a recent version of HikaShop the product page was changed so that it is no longer wrapped in a single form element (this gives more freedom for customization). As a side effect, when the options are displayed as checkboxes, the add to cart was sending the option to the server even when its box was left unchecked, so it got added to the cart. The single dropdown works because it always sends an explicit "No" value, which the server ignores.

The good news is that this is already fixed in the current build of HikaShop. You just need to update: download the latest HikaShop package from your account on our website and install it over your current site (installing over an existing install only refreshes the files, it does not touch your data). After that, do a hard refresh on your frontend and the checkbox options will only be added when they are actually checked.

The following user(s) said Thank You: daryd

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

  • Posts: 6
  • Thank you received: 2
15 hours 32 minutes ago #372545

Installing the current build fixed the problem and worked perfectly on both sites.. Once again thank you so much for your quick reply and all the help!

The following user(s) said Thank You: nicolas

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

Time to create page: 0.056 seconds
Powered by Kunena Forum