Where would I find custom code after order has been submitted

  • Posts: 1
  • Thank you received: 0
1 day 22 minutes ago #368189

-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.3.33

I have inherited a company's Joomla application that uses the Hikashop. Everything works fine, but I can't find where the custom code is located that submits an api call to Celigo, a 3rd party application that sends the sales order to Netsuite. The company's goal is to change everything that calls Celigo and make the call from Joomla. The reason is the Celigo contract is getting renewed in a month and they want to get away from them because the $$$ are going up. I have already made changes to the api file in Joomla that is triggered via a button in Administrator under Orders. Press the button, and the order is created in Netsuite.

The problem is that it is a manual process the previous contractors added to help resolve issues that could occur during the order process. It doesn't happen very often but I also don't know if this PHP code is called during the submit order. I don't have any way to contact this contracting company, no longer in business. It's possible they may have used cron to pull new orders and send to Celigo but I have no access to the actual host server. I have access to the code in Sharepoint via WinSCP, but I'm not able to login to the actual host server. If I could, I'd be able to pull up the crontask and see if there are any cron jobs.

Outside of this, where would I find in Hikashop/Joomla where the Finish button process is handled?

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

  • Posts: 84216
  • Thank you received: 13666
  • MODERATOR
21 hours 44 minutes ago #368190

Hi,

I would recommend downloading all the files of the website and doing a search on all the files to find what you need. Otherwise, it's hard to say where is what as there are many ways to do it.

If it was done correctly, then it should be in a plugin of either the groups hikashop, hikashoppayment, hikashopshipping or system, and it should implement one of the order events:
www.hikashop.com/support/documentation/6...mentation.html#order
So if the search for celigo code doesn't yield anything, you could search for the onAfterOrderCreate or onAfterOrderUpdate events in the plugins of these groups.

Now, it's also possible, but a lot less likely, that the developer created an override of class.order in order to add its code to the
save method ( as per www.hikashop.com/support/documentation/6...ntation.html#classes
). But I doubt it.
Another possibility would be that the code is added in the core files of HikaShop in administrator/components/com_hikashop/classes/order.php in the save method.
Another possibility would be that the developer added the connection to celigo in a view override of the thank you page so you could check if you have files in the templates/YOUR_TEMPLATE/html/com_hikashop/checkout / folder.
A system plugin could also be coded to intercept the thank you page processing, or the payment notification request from the payment gateway, with joomla events like onAfterRoute or onAfterInitialize and do its thing. But I doubt it too.
However, we usually don't recommend the last 4 possibilities.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum