- Posts: 6
- Thank you received: 2
System Plugins, i.e. onAfterCompleteOrder?
- Greg
- Topic Author
- Offline
- New Member
-
Less
More
9 years 9 months ago #65607
by Greg
System Plugins, i.e. onAfterCompleteOrder? was created by Greg
I see that the code does have some provision for events such as onAfterCompleteOrder, but I can't find a plugin that has the matching code. Is there one available that I can model some customization after, and learn what events are available?
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
-
- Offline
- Administrator
-
9 years 9 months ago #65636
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic System Plugins, i.e. onAfterCompleteOrder?
Hello Greg,
There is no plugins use these events now. We only put them there for the developers to develop third party extensions or to integrate EShop with other system. However, you can make a system plugin with function onAfterCompleteOrder($row) with $row is the orders object.
Hope that this will help.
Sincerely, Giang
There is no plugins use these events now. We only put them there for the developers to develop third party extensions or to integrate EShop with other system. However, you can make a system plugin with function onAfterCompleteOrder($row) with $row is the orders object.
Hope that this will help.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
- 70's
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
7 years 11 months ago #98168
by 70's
Replied by 70's on topic System Plugins, i.e. onAfterCompleteOrder?
Hi, sorry to post on an old topic, but right now I'm struggling to build a system plugin for Eshop and it would be great to see an example to start my plugin.
Did you managed to write your plugin Greg? If yes, could you share it here please?
Did you managed to write your plugin Greg? If yes, could you share it here please?
Please Log in or Create an account to join the conversation.
- Greg
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 2
7 years 11 months ago #98698
by Greg
Replied by Greg on topic System Plugins, i.e. onAfterCompleteOrder?
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.
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)
{
}
}
The following user(s) said Thank You: Giang Dinh Truong, 70's
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
-
- Offline
- Administrator
-
7 years 11 months ago #98714
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic System Plugins, i.e. onAfterCompleteOrder?
That's useful!
Thank you Greg!
Sincerely, Giang
Thank you Greg!
Sincerely, Giang
Please Log in or Create an account to join the conversation.
Moderators: Giang Dinh Truong
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.