Sorry for the long delay...vacation and a PC in the shop.
Here's the skeleton code of my plugin. you'll need to setup a basic/standard Joomla Installer for it.
Note, I discovered that the onCompleteOrder does EXACTLY what it says...when the order is "Complete"...in other words, AFTER payment is received, so don't depend on it to run before that.
Code:
<?php
// install to root\plugins\eshop\myplugin\myplugin.php
/**
* @version 1.3.1
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2014 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die();
class plgEshopMyPlugin extends JPlugin
{
public function __construct(& $subject, $config)
{
parent::__construct($subject, $config);
}
/**
* @param array of JTable::getInstance('Eshop', 'Order');
*/
function onAfterEditOrder($Order)
{
}
function onAfterDeleteOrder($customer_id)
{
return true;
}
/**
* @param array of JTable::getInstance('Eshop', 'Order');
*/
function onAfterCompleteOrder($Order)
{
}
}