Prevent Adding Product to Cart Without Selecting a Variant

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
3 years 8 months ago #322625

This feature should be part of Hikashop for a better user experience and to prevent mistakes. Every eCommerce site that I buy from do not allow you to add anything to the cart until you select a size, colour, or whatever the variant is, unless the product has no variant. Also, the default item should not be automatically added to the cart.

Unless I'm missed this feature, I find that with Hikashop a customer can buy without making a selection and this can cause confusion to buyers and mistakes to sellers.

For example, a buyer can add an item to the cart, and purchase, without realizing that they did not select the variant that they actually needed.

Maybe this can give you an idea of what I'm referring to:
shopify.dev/tutorials/customize-theme-ho...option-to-drop-downs

Thanks!

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 8 months ago #322632

Hi,

It is not possible to add a product to the cart without selecting a variant in HikaShop.
That's because a variant is automatically preselected.
However, I remember that you recently talked to me here:
www.hikashop.com/forum/product-category-...-causing-issues.html
In this thread, you say that you modified HikaShop to hide the default variant. So in that case, the add to cart button is the one of the default variant that you hide. The code I gave you on this thread should allow you to hide that default add to cart button so that it only appears after you selected another variant.

Now what you can do is activate the "Characteristics dynamic display" setting of your HikaShop configuration. If you have products with more than one characteristic, the system will automatically work with no variant selected and the customer will be able to select a variant and then the add to cart button will appear.
For the products where you only have one characteristic, instead of having an extra variant that you set as default and hide, I would rather recommend to add an extra characteristic with one value and set it as the first one.
Then, hide the first characteristic selector with CSS, and you'll have a second characteristic selector which will work exactly like you want without the issue of being able to add to the cart the product before the selection of the variant is made.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum