- Posts: 14
- Thank you received: 0
Bonus Item Option
11 years 7 months ago #189564
by blacknine
Bonus Item Option was created by blacknine
-- 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.
-- 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.
11 years 7 months ago #189570
by Xavier
Replied by Xavier on topic Bonus Item Option
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
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.
11 years 7 months ago #189707
by blacknine
Replied by blacknine on topic Bonus Item Option
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.
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.
11 years 7 months ago #189714
by Jerome
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.
Replied by Jerome on topic Bonus Item Option
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,
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.
10 years 7 months ago #231490
by ralph024
Replied by ralph024 on topic Bonus Item Option
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
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.
10 years 7 months ago #231501
by nicolas
Replied by nicolas on topic Bonus Item Option
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
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.161 seconds