Custom Checkout Step

  • Posts: 158
  • Thank you received: 5
4 years 10 months ago #314928

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.14

I'm looking to add a custom checkout step which sends the user to a custom form to complete a credit (finance) application), then I can send the user back to complete the final checkout step.

I have found a possible solution here ... www.hikashop.com/support/documentation/6...fterCartProductsLoad

But I have no idea how or where to implement such code, or even if it will do what I want it to do.

Can you please point me in the right direction.

Thanks in advance.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 10 months ago #314959

Hi,

You would indeed need to create a plugin of the group "hikashop", and then implement the triggers :
- onCheckoutStepList(&$list) to add a view type to the checkout workflow editor so that you can add your interface where you want in the checkout
- onCheckoutStepDisplay($layoutName, &$html, &$view, $pos=null, $options=null) to display the interface by adding it to $html. Note that you need to check that $layoutName is the one you defined in onCheckoutStepList
- onAfterCheckoutStep($layoutName, &$go_back, $original_go_back, &$controller) to check that the interface has been used and do any necessary processing. Here again, you want to check layoutName.
You can check in the folder plugins/hikashop/userpoints/ where we've done the same thing for the user points plugin so that you can have a points interface on the checkout to choose whether you want to use your points or not and how much points you have left.

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

  • Posts: 158
  • Thank you received: 5
4 years 10 months ago #314964

Thanks Nicolas, however that looks far to complex - I was hoping for a much easier solution.

The main issue is that the customer gets notified that the order is created before they have completed the application form, so I thought that by going into the payment method and selecting NO under order status notification then it would prevent anything being sent to the customer? (BTW, there is no Hikashop help available for this page).

However I still get an order created email - is there a way to prevent this and I can send a manual email when the finance application has been accepted?



Thanks

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 10 months ago #314965

Hi,

HikaShop sends two emails to the customer:
- the order creation notification which is sent when the order is created at the end of the checkout
- the order status notification which is sent when the order status is changed to confirmed automatically (or when you change it manually and activate the notification to the customer)
So from what you're describing, you want to disable the "order creation notification" via the System>Emails menu.
That way, only the second email will be sent, and that will be only the case if the "order status notification" setting is turned on in your payment method.

You can check the emails sent to the customer in the Customers>Emails history menu.

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

  • Posts: 158
  • Thank you received: 5
4 years 10 months ago #314987

Thanks, if I disable the "order creation notification" I guess it will also disable it for all my other payment methods too?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 10 months ago #314990

That's correct. Now you can also keep it enabled and modify its code to only send it for some payment methods:
www.hikashop.com/forum/orders-management...h-bank-transfer.html

The following user(s) said Thank You: serbofleconcepts

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

  • Posts: 158
  • Thank you received: 5
4 years 10 months ago #315012

Brilliant! Thanks Nicolas.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum