- Posts: 32
- Thank you received: 0
plugin that gets activated when a order is created
- diesel1984
-
Topic Author
- Offline
Less
More
11 years 6 months ago #201167
by diesel1984
plugin that gets activated when a order is created was created by diesel1984
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 2.5
-- PHP version -- : 5
Hi,
I am trying to write a custom plugin that gets activated whenever an order is created. However, the plugin function is simply not executing during the checkout process. So basically right before i get redirected to the payment gateway, the order is created in the system (i can see it in the backend of hikashop). However, the onAfterOrderCreate() function is not executing at this point - if this is how hikashop is setup, then what plugin event (function) can i call upon that will execute at this point? I am then taken off to the payment gateway - but i stop at this point because i dont want to put a payment through the system. Can anyone see the reason why this is happening? The plugin is installed and its been enabled...
\plugins\hikashoppayment\order\order.php
\plugins\hikashoppayment\order\order.xml
\plugins\hikashoppayment\order\index.php
code for \plugins\hikashoppayment\order\order.php
Thanks in advance
-- Joomla version -- : 2.5
-- PHP version -- : 5
Hi,
I am trying to write a custom plugin that gets activated whenever an order is created. However, the plugin function is simply not executing during the checkout process. So basically right before i get redirected to the payment gateway, the order is created in the system (i can see it in the backend of hikashop). However, the onAfterOrderCreate() function is not executing at this point - if this is how hikashop is setup, then what plugin event (function) can i call upon that will execute at this point? I am then taken off to the payment gateway - but i stop at this point because i dont want to put a payment through the system. Can anyone see the reason why this is happening? The plugin is installed and its been enabled...
\plugins\hikashoppayment\order\order.php
\plugins\hikashoppayment\order\order.xml
\plugins\hikashoppayment\order\index.php
code for \plugins\hikashoppayment\order\order.php
Code:
<?php
/**
Version: 1.0.0
Date: 20/04/2015
*/
defined('_JEXEC') or die('Restricted access');
?><?php
class plgHikashopOrder extends hikashopPaymentPlugin {
public function onAfterOrderCreate(&$order,&$send_email) {
print('ok'); exit();
//i did initially try some database statements here but they didnt work either
//so i can only assume that this plugin event is not executing
}
}
Thanks in advance
Please Log in or Create an account to join the conversation.
11 years 6 months ago #201168
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic plugin that gets activated when a order is created
Hi,
If you are creating a hikashop payment plugin, the class name should be : plgHikashoppaymentOrder
The current name is for a "hikashop" plugin, not for a "hikashoppayment" one.
Regards,
If you are creating a hikashop payment plugin, the class name should be : plgHikashoppaymentOrder
The current name is for a "hikashop" plugin, not for a "hikashoppayment" one.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds