[Skip to main content](#vessel-content)

#   Bonus Item Option

##

- **[blacknine](/forum/user/36034-blacknine "View blacknine's Profile")**
- [![blacknine's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36034-blacknine "View blacknine's Profile") Topic Author
- [ Offline](/forum/user/36034-blacknine)

Less More

- Posts: 14
- Thank you received: 0
-
-

11 years 9 months ago [\#189564](#189564) by [blacknine](/forum/user/36034-blacknine "View blacknine's Profile")  *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")* was created by *[blacknine](/forum/user/36034-blacknine "View blacknine's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 9 months ago [\#189570](#189570) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#189570 "-- 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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")*

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](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html#onBeforeCartUpdate)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[blacknine](/forum/user/36034-blacknine "View blacknine's Profile")**
- [![blacknine's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36034-blacknine "View blacknine's Profile") Topic Author
- [ Offline](/forum/user/36034-blacknine)

Less More

- Posts: 14
- Thank you received: 0
-
-

11 years 9 months ago [\#189707](#189707) by [blacknine](/forum/user/36034-blacknine "View blacknine's Profile")  Replied by *[blacknine](/forum/user/36034-blacknine "View blacknine's Profile")* on topic *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#189707 "-- 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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#189714](#189714) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#189714 "-- 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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")*

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](http://www.hikashop.com/forum/product-category-display/874019-product-link-to-proceed-to-checkout-immediatly.html#185347)
[ www.hikashop.com/forum/development/87352...ne-click.html#182693](http://www.hikashop.com/forum/development/873523-add-multiple-products-in-one-click.html#182693)

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ralph024](/forum/user/40990-ralph024 "View ralph024's Profile")**
- [![ralph024's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar40990.jpg)](/forum/user/40990-ralph024 "View ralph024's Profile")
- [ Offline](/forum/user/40990-ralph024)

Less More

- Posts: 39
- Thank you received: 1
-
-
-

10 years 8 months ago [\#231490](#231490) by [ralph024](/forum/user/40990-ralph024 "View ralph024's Profile")  Replied by *[ralph024](/forum/user/40990-ralph024 "View ralph024's Profile")* on topic *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#231490 "-- 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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

10 years 8 months ago [\#231501](#231501) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bonus Item Option](/forum/31-development/874769-bonus-item-option#231501 "-- 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 &quot;Next&quot; button. I'm trying to add this bonus item in order items.  Any suggestion or help will be greatly appreciated.  Thank you.")*

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](https://www.hikashop.com/forum/checkout/882641-free-gift-product-at-checkout.html)

The following user(s) said Thank You: [ralph024](/forum/user/40990-ralph024 "View ralph024's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3NDc2OS1ib251cy1pdGVtLW9wdGlvbj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
