Customizing Hika Shop for Guest Operations

  • Posts: 3
  • Thank you received: 0
11 years 8 months ago #101398

Hi, My company seeking eCommerce solution for the Joolma and I we intended to make use of Hikashop for our backend and checkout process. Currently I am using Starter version for my POC and would purchase the business version shortly.
I see the Hikashop has already support Guest checkout, thats what we needed.
But in our checkout I intend to use product custom field to capture user's email (because our checkout flow is mostly depends on product, therefore we did not include the custom field in checkout), I just had few question and see if my requirements are feasible to be implemented.

1. Send Email notification to Guest Customer in onAfterOrderCreated and onAfterOrderUpdated, Currently I can make use of plugin to send email to a dedicated email (POC) and I think I may get the customer email from the product custom fields (e.g. $order->cart->fields->field_value) in the $order object, am I right?
2. Our shop needed to provide order tracking feature for the guest customer by input the email and order id, I know the order controller will always check if the user is logged in, therefore should we override the controller and implement our code for retrieving the order record?
3. Since we are using guest checkout, the backend is not displaying any customer information, so it is feasible for us to edit the backend views to display the product based custom value as a customer name for order? (order listing in dashboard and orders page)

I am also evaluating if it is less effort to auto creating customer record during checkout (by using the email captured from product custom field), if so can give me some ideas on where the best place to put the auto customer creation (e.g. in onBeforeOrderCreated) and also how can I save and replace the customer within $order.

thanks.

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

  • Posts: 3
  • Thank you received: 0
11 years 8 months ago #101604

Could anyone could suggest me to overcome the problems, that would be appreciate.

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

  • Posts: 83050
  • Thank you received: 13409
  • MODERATOR
11 years 8 months ago #101621

Hi,

1. The custom fields are indeed available in the $order object. If you do a var_dump in your plugin, you'll be able to see how to access what you need.

2. Yes. You can override the controller by copying the class in a system plugin so that it is loaded before the HikaShop order controller.

3. Yes. All the views, frontend and backend, can be edited via the menu Display->Views. On can search for the dashboard view files and the order listing view file.

4. onBeforeOrderCreate is great. You can directly replace the order_user_id in the $order object in that function and the order will have your user assigned to it.

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

  • Posts: 3
  • Thank you received: 0
11 years 8 months ago #101623

Thanks Nicolas, I think I've gather what I needed

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

Time to create page: 0.060 seconds
Powered by Kunena Forum