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

#   TIP LINE

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

12 years 7 months ago [\#153596](#153596) by [JOHNC](/forum/user/32355-johnc "View JOHNC's Profile")  *[TIP LINE](/forum/27-checkout/867703-tip-line#153596 "-- url of the page with the problem -- :   www.wingkingenglewood.com  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- :5.3.28 -- Browser(s) name and version -- : explorer 11 -- Error-message(debug-mod must be tuned on) -- : No error message Is it possible to add a TIP LINE in the CHECKOUT?  Thank you for any help. John")* was created by *[JOHNC](/forum/user/32355-johnc "View JOHNC's Profile")*

-- url of the page with the problem -- : [ www.wingkingenglewood.com](http://www.wingkingenglewood.com)
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.3
-- PHP version -- :5.3.28
-- Browser(s) name and version -- : explorer 11
-- Error-message(debug-mod must be tuned on) -- : No error message
**Is it possible to add a TIP LINE in the CHECKOUT?**

Thank you for any help.
John

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NzcwMy10aXAtbGluZT90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

12 years 7 months ago [\#153614](#153614) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[TIP LINE](/forum/27-checkout/867703-tip-line#153614 "-- url of the page with the problem -- :   www.wingkingenglewood.com  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- :5.3.28 -- Browser(s) name and version -- : explorer 11 -- Error-message(debug-mod must be tuned on) -- : No error message Is it possible to add a TIP LINE in the CHECKOUT?  Thank you for any help. John")*

Hi,

There is no option for that.
That would require custom coding. You would have to create a custom order field via the menu Display&gt;Custom fields so that the user could enter the tip and then you would have to create a small HikaShop plugin implementing the trigger onAfterCartShippingLoad and add the value of the custom field in the array $cart-&gt;additional.

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

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

Less More

- Posts: 9
- Thank you received: 1
-
-

12 years 5 months ago [\#158165](#158165) by [thewebtailors](/forum/user/30632-thewebtailors "View thewebtailors's Profile")  Replied by *[thewebtailors](/forum/user/30632-thewebtailors "View thewebtailors's Profile")* on topic *[TIP LINE](/forum/27-checkout/867703-tip-line#158165 "-- url of the page with the problem -- :   www.wingkingenglewood.com  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- :5.3.28 -- Browser(s) name and version -- : explorer 11 -- Error-message(debug-mod must be tuned on) -- : No error message Is it possible to add a TIP LINE in the CHECKOUT?  Thank you for any help. John")*

I am the webmaster of wingkingenglewood.com. I tried to implement the tip line like suggested and it almost works... Only problem is that $cart does not keep the additional info in the next steps. I have the tip line a couple steps before the Summary page. If I print_r $cart on the summary page for instance, the info I added to $cart-&gt;additional disappeared.
Any ideas? Thank you!
Here is my plugin code: Code:

class plgHikashopTwt_tip extends JPlugin { function plgHikashopTwt_tip(&amp;$subject, $config){ parent::__construct($subject, $config); } function onAfterCartProductsLoad(&amp;$cart) { $array = $_POST['data']; if(array_key_exists('tip',$array['order'])) { if(preg_match('/^\d+(?:\.\d{2})?$/',$array['order']['tip'])) { $price = $array['order']['tip']; } else { $price = "0.00"; } $object-&gt;price_value = (string)$price; $object-&gt;price_value_with_tax = (string)$price; $object-&gt;price_currency_id=2; $object-&gt;name="TIP"; $object-&gt;value=0; $cart-&gt;additional['tip']=$object; } } }

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

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

Less More

- Posts: 9
- Thank you received: 1
-
-

12 years 5 months ago [\#158212](#158212) by [thewebtailors](/forum/user/30632-thewebtailors "View thewebtailors's Profile")  Replied by *[thewebtailors](/forum/user/30632-thewebtailors "View thewebtailors's Profile")* on topic *[TIP LINE](/forum/27-checkout/867703-tip-line#158212 "-- url of the page with the problem -- :   www.wingkingenglewood.com  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- :5.3.28 -- Browser(s) name and version -- : explorer 11 -- Error-message(debug-mod must be tuned on) -- : No error message Is it possible to add a TIP LINE in the CHECKOUT?  Thank you for any help. John")*

I used now Joomla Sessions to readd it on every page to the cart object. Seems to work now...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NzcwMy10aXAtbGluZT90bXBsPW1hcmtkb3du) 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: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 5 months ago [\#158167](#158167) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[TIP LINE](/forum/27-checkout/867703-tip-line#158167 "-- url of the page with the problem -- :   www.wingkingenglewood.com  -- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.3 -- PHP version -- :5.3.28 -- Browser(s) name and version -- : explorer 11 -- Error-message(debug-mod must be tuned on) -- : No error message Is it possible to add a TIP LINE in the CHECKOUT?  Thank you for any help. John")*

Hi,

Yes, you have to set the additional every time the cart is loaded.
It means that you have to use the session to store your data and re-set the cart additional tip if there is something in the Joomla user session.

When the cart will be converted to an order at this moment the additional will be fixed in the database. But the additionals are not stored in the database (and so, the session) but HikaShop.
For the cart, it is dynamic fields managed by plugins.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NzcwMy10aXAtbGluZT90bXBsPW1hcmtkb3du) 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.074 seconds

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