Converting a vm plugin to Hikashop.

  • Posts: 256
  • Thank you received: 21
10 years 2 months ago #170366

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.24

I am attempting to convert an SAP OCI plugin that was developed for Virtuemart to work with Hikashop. It is a system plugin that is triggered by the onAfterDispatch event in the landing page after payment and sends the order details to the client SAP system.

function onAfterDispatch()

    {
		$this->khInitalize();
		if(!$this->okToSend)	
		{
			return;
		} 
		$this->createForm();
		return;
	}

All payments are offline so basically this needs to be triggered by the finish button on the cart so probably should be a payment plugin in its own right. This is a new area for me so any suggestions would be welcome.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #170375

Hi,

I think that you have to use the trigger "onAfterOrderCreate()", here is a link with the documentation for the plugins.
All the triggers are listed.

hikashop.com/support/support/documentati...r-documentation.html

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

  • Posts: 256
  • Thank you received: 21
10 years 2 months ago #170865

That works great. I had to add a test in the function to make it run only for one client group so now when customers in one client group make purchases the cart send the order data through to that customers SAP system for validation using the SAP OCI while retail customers go through the traditional shopping cart process.

That means my last problematic Virtuemart site gone and replaced by Hikashop.

Its nice to work with a shopping cart system that is so well designed that we can add this kind of functionality with hacking the code. Its even nicer to have this great support from you guys so I actually look like a guru to my clients.

Last edit: 10 years 2 months ago by rodfarrell.
The following user(s) said Thank You: Xavier

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

Time to create page: 0.069 seconds
Powered by Kunena Forum