HikaShop – Best practice for saving custom shipping data (locker selection)

  • Posts: 1127
  • Thank you received: 12
2 hours 49 minutes ago #370007

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.2.3
-- PHP version -- : 8.3

We are working on a custom shipping plugin for HikaShop (Joomla 5) that integrates BoxNow lockers selection during checkout.

The flow is the following:

Customer selects the BoxNow shipping method

A popup widget opens and the customer selects a locker

Locker data is correctly returned on the frontend (locker ID, name, address, postal code, city)

The data is temporarily stored (via session / AJAX)

What we want to achieve (and where we would appreciate your confirmation on best practice):

➡️ Persist the selected locker data into the final order, so that:

It is visible in the order backend (admin)

It can be used in order emails and order views

It is properly linked to the shipping method

Currently, we are handling this in the shipping plugin using onShippingSave() and injecting the locker data into $cart->shipping->shipping_params, letting HikaShop handle the order persistence automatically.

Our questions:

Is onShippingSave() the recommended hook to attach custom shipping-related data (such as locker info) to the order?

Is storing this data inside shipping_params the correct and future-proof approach?

Would you recommend any alternative hook or method (for example, onAfterOrderCreate) for this use case?

Is there any official guideline or example for saving custom shipping metadata into an order?

We want to stay fully aligned with HikaShop’s internal architecture and avoid hacks or direct database writes.

Thank you in advance for your time and support — any guidance or confirmation would be greatly appreciated.

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

Time to create page: 0.047 seconds
Powered by Kunena Forum