Hi,
I created a folder bccmail under plugins/hikashop/ and I made bccmail.xml and bccmail.php
In bccmail.php I added the following code:
<?php
/**
* @package HikaShop for Joomla!
* @version 2.1.3
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
class plgHikashopBccMail extends JPlugin
{
function plgHikashopBccMail(&$subject, $config){
parent::__construct($subject, $config);
if(!isset($this->params)){
$plugin = JPluginHelper::getPlugin('hikashop', 'bccmail');
if(version_compare(JVERSION,'2.5','<')){
jimport('joomla.html.parameter');
$this->params = new JParameter($plugin->params);
} else {
$this->params = new JRegistry($plugin->params);
}
}
}
function onBeforeMailSend(&$mail,&$mailer){
$mailer->addBCC('xxxxxxx@gmail.com');
}
}
What do I need to do so that this plugin is triggered in the Order creation notification.
Do I need to add some code in the "Order creation notification" email?
I'm not sure how this plugin knows when to get executed.
Thanks.
EDIT: I did not make anything else like an installation file since I have no experience with making plugins.