- Posts: 1
- Thank you received: 0
Hook f'Thank you for your purcahor post checkout order with total payment of $0
1 year 2 months ago - 1 year 2 months ago #367700
by smorloc
Hook f'Thank you for your purcahor post checkout order with total payment of $0 was created by smorloc
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.6.40
Howdy.
I am trying to help someone on a very old system that has been meeting their needs. They exclusively use a custom payment method. When that payment method succeeds, the system does some housekeeping in that payment method's onPaymentNotification() function. When creating an order for a cart of free items, we need some hook to do the same housekeeping. On the checkout page there is a 'Pay Now' button. That button immediately creates a Hika order, displays a THANK_YOU_FOR_PURCHASE message page and the user receives an email confirmation. Is there a hook (outside of a payment method) where we might be able to perform our housekeeping.
I apologize, the system is quite old. Please don't laugh and/or shame. I am just trying to help. This is the info:
HikaShop Version 2.4.0
PHP Version 5.6.40
Joomla! Version 3.4.1 Stable
Thanks.
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.6.40
Howdy.
I am trying to help someone on a very old system that has been meeting their needs. They exclusively use a custom payment method. When that payment method succeeds, the system does some housekeeping in that payment method's onPaymentNotification() function. When creating an order for a cart of free items, we need some hook to do the same housekeeping. On the checkout page there is a 'Pay Now' button. That button immediately creates a Hika order, displays a THANK_YOU_FOR_PURCHASE message page and the user receives an email confirmation. Is there a hook (outside of a payment method) where we might be able to perform our housekeeping.
I apologize, the system is quite old. Please don't laugh and/or shame. I am just trying to help. This is the info:
HikaShop Version 2.4.0
PHP Version 5.6.40
Joomla! Version 3.4.1 Stable
Thanks.
Last edit: 1 year 2 months ago by smorloc.
Please Log in or Create an account to join the conversation.
1 year 2 months ago #367703
by nicolas
Replied by nicolas on topic Hook f'Thank you for your purcahor post checkout order with total payment of $0
Hi,
No worries. Note that even if you can't update Joomla, the latest version of HikaShop is still compatible with Joomla 3.
However, it's a big update as many things changed in HikaShop. So if you plan on updating HikaShop in the future, I would recommend first testing on a copy of the website.
Regarding the issue at hand, I can say for sure, but normally, when an order is created, the onAfterOrderCreate event is triggered:
www.hikashop.com/support/documentation/6...l#onAfterOrderCreate
So, you should be able to implement that event and do your processing in it. Not that this event will be called for all the "hikashop" and "hikashoppayment" plugins. So you could potentially directly implement it in that custom payment plugin, even if the payment plugin doesn't handle the payment. Note also that you'll want to change the order_payment_method since you probably want to not do the house keeping at the order creation step when the payment plugin is used for the payment (since it will be done later on, in the onPaymentNotification method).
No worries. Note that even if you can't update Joomla, the latest version of HikaShop is still compatible with Joomla 3.
However, it's a big update as many things changed in HikaShop. So if you plan on updating HikaShop in the future, I would recommend first testing on a copy of the website.
Regarding the issue at hand, I can say for sure, but normally, when an order is created, the onAfterOrderCreate event is triggered:
www.hikashop.com/support/documentation/6...l#onAfterOrderCreate
So, you should be able to implement that event and do your processing in it. Not that this event will be called for all the "hikashop" and "hikashoppayment" plugins. So you could potentially directly implement it in that custom payment plugin, even if the payment plugin doesn't handle the payment. Note also that you'll want to change the order_payment_method since you probably want to not do the house keeping at the order creation step when the payment plugin is used for the payment (since it will be done later on, in the onPaymentNotification method).
Please Log in or Create an account to join the conversation.
Time to create page: 0.212 seconds