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

#   onShippingSave no longer available?

##

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

Less More

- Posts: 88
- Thank you received: 20
-
-

5 years 8 months ago [\#330458](#330458) by [dyvel](/forum/user/39996-dyvel "View dyvel's Profile")  *[onShippingSave no longer available?](/forum/31-development/902110-onshippingsave-no-longer-available#330458 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4  Hi  I have created a custom shipping plugin that uses the onShippingSave hook. However, something seems broken after update to 4.4.1, so I was wondering if onShippingSave was no longer available?  Merci")* was created by *[dyvel](/forum/user/39996-dyvel "View dyvel's Profile")*

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4

Hi

I have created a custom shipping plugin that uses the onShippingSave hook. However, something seems broken after update to 4.4.1, so I was wondering if onShippingSave was no longer available?

Merci

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

5 years 8 months ago [\#330470](#330470) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[onShippingSave no longer available?](/forum/31-development/902110-onshippingsave-no-longer-available#330470 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4  Hi  I have created a custom shipping plugin that uses the onShippingSave hook. However, something seems broken after update to 4.4.1, so I was wondering if onShippingSave was no longer available?  Merci")*

Hi,

onShippingSave is still available.
So the issue must be somewhere else.

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

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

Less More

- Posts: 88
- Thank you received: 20
-
-

5 years 8 months ago [\#330704](#330704) by [dyvel](/forum/user/39996-dyvel "View dyvel's Profile")  Replied by *[dyvel](/forum/user/39996-dyvel "View dyvel's Profile")* on topic *[onShippingSave no longer available?](/forum/31-development/902110-onshippingsave-no-longer-available#330704 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4  Hi  I have created a custom shipping plugin that uses the onShippingSave hook. However, something seems broken after update to 4.4.1, so I was wondering if onShippingSave was no longer available?  Merci")*

What calls onShippingSave?

Could it be a Hikashop change to onShippingDisplay or some other changes. We haven't changed anything other than updating Hikashop. onShippingDisplay contains $usable_methods with correct data, and it's rendered for the user with selectable shipping options.

The correct shipping_id and type is also saved on the order, so the information is still transferred from $usable_methods and what option is selected.

But I have no luck activating onShippingSave - any idea about where to look?

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

5 years 8 months ago [\#330712](#330712) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[onShippingSave no longer available?](/forum/31-development/902110-onshippingsave-no-longer-available#330712 "-- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4  Hi  I have created a custom shipping plugin that uses the onShippingSave hook. However, something seems broken after update to 4.4.1, so I was wondering if onShippingSave was no longer available?  Merci")*

Hi,

onShippingSave is called when the shipping method selection is changed on the legacy checkout but that isn't the case anymore with the new checkout system.
I suppose that you were previously using the old checkout system and the 4.4.0 removing the "checkout legacy" system lead to moving to the new checkout and the mechanism you were using before doesn't work properly anymore because the saving is handled differently on the new checkout system.
The goal of that function was to check that the selected shipping method was indeed available to the customer.
However, this check is now handled directly when saving the checkout without the need to call a function of the shipping plugins as the cart system already knows what are the available shipping methods.

What you're saying seems to indicate that you were using onShippingSave for something else.
For example, maybe you were adding your own HTML to the shipping method selector with custom_html and in that case, you have the trigger onShippingCustomSave(&amp;$cart, &amp;$shipping, $group, $data) you can implement but this supposes that you HTML has input fields with names like checkout[shipping][custom][$group][$shipping_id][name]

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

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