Bonus Item Option

  • Posts: 14
  • Thank you received: 0
9 years 9 months ago #189564

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.15

Hi,

I'm trying to develop a feature in hikashop frontend, which allows user to select a free bonus item (from a list of items) once they add a product in their cart. These bonus items are also products but are from different category.
I managed to display the list of bonus items in Cart page, user can select a bonus item when they reach the cart page which is the first step of checkout but now i'm stuck as how i can add that bonus item in order when they click on "Next" button. I'm trying to add this bonus item in order items.

Any suggestion or help will be greatly appreciated.

Thank you.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #189570

Hi,

I think that the easiest way will be to set these bonus item as products as you have done and then display them as common products with an add to cart button, potentially rename this button for these products by editing the view "product / listing_img_title".

Then when clicking on the "add to cart" button add the product to the cart, but it will require the creation of a new plugin to do some checks. The plugin can be based on the function "onBeforeCartUpdate()". If there is products in cart, so add the product else, set $do to false in order to not add the product, etc.

So it require PHP knowledges.

Another solution could be to use custom order fields, and let the customer select a bonus from a dropdown and once again thanks to a plugin check the value and add product with the id selected in the dropdown in the cart.

www.hikashop.com/support/support/documen...l#onBeforeCartUpdate

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

  • Posts: 14
  • Thank you received: 0
9 years 9 months ago #189707

Hi Xavier,

Thanks for replying back.
One more thing i want to know, is there anyway we can add a product in cart using only its product_id and quantity.

Thanks again.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 9 months ago #189714

Hi,

You can use the "add to cart link". You have a special button in your toolbar when editing a product in the backend.

Here some threads where Nicolas talk about the "updatecart" link.
www.hikashop.com/forum/product-category-...mediatly.html#185347
www.hikashop.com/forum/development/87352...ne-click.html#182693

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 39
  • Thank you received: 1
8 years 8 months ago #231490

Hi,

What is the solution for this Bonus item option?
We also try to find a solution, but unfortunately we fail to realize this.... :blush:

can somebody help us please?

Thanks

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
8 years 8 months ago #231501

Hi,

As we answered you this last few days, there is no solution that doesn't involve some kind of coding:
www.hikashop.com/forum/checkout/882641-f...uct-at-checkout.html

The following user(s) said Thank You: ralph024

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

Time to create page: 0.077 seconds
Powered by Kunena Forum