Require a specific item in the cart for checkout

  • Posts: 2
  • Thank you received: 0
11 years 7 months ago #130615

-- HikaShop version -- : HikaShop Essential 2.2
-- Joomla version -- : 2.5x
-- PHP version -- : 5.3.x

Hello,
Is it possible to have Hikashop require a specific item to be in the cart before allowing the customer to checkout? For example, every order must choose a Soda/Type. No matter what other items the customer has in the cast, if the customer doesn't have a soda in the cart, they aren't allowed to complete the checkout and receive an error message.

I've tried to set the minimum number of the product to 1 but that didn't have the result I wanted.

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

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 7 months ago #130685

Hi,

You can't do it directly like that. The minimum number of items of a product will force the user to purchase at least that amount of items for that product if they want to purchase it. But if they don't purchase the product, then nothing is done.

I'll have to use some trick to do what you want. I think that you should use the volume of the products and restrictions on the volume in your shipping methods in order to not have any matching shipping methods if there is no product with a volume in the cart and only add dimensions in your products of the soda type. That way, the checkout won't let you finish and will display an error message that no shipping methods were found because of the volume. then, you can simply change that text with a translation override to explain to the user that he needs to add a soda to be able to finish the checkout.

The following user(s) said Thank You: dhopkins

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

  • Posts: 2
  • Thank you received: 0
11 years 7 months ago #130956

Thanks a lot. I'll try that out.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum