plugin that gets activated when a order is created

  • Posts: 32
  • Thank you received: 0
10 years 2 weeks ago #201167

-- 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

<?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.

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 2 weeks ago #201168

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum