Hello,
I have noticed that when I put the ->sendMail code inside the plugin it works and sends two emails! (Don't really understand why two).
<?php
define('_JEXEC', 1);
define('JPATH_BASE', '../../../');
require_once JPATH_BASE . 'includes/defines.php';
require_once JPATH_BASE . 'includes/framework.php';
$app = JFactory::getApplication('site');
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;
Is this all I need to work with the hikashop? loadFullOrder etc all works fine but am I missing something that stops the emails/notifications from being sent?
$orderClass = hikashop_get('class.order');
$order = $orderClass->loadNotification((int)$order_id, 'order_status_notification');
$mailClass = hikashop_get('class.mail');
$mailClass->sendMail($order->mail);
Above code
works inside plugin but
not in my own script
Thanks for your help
## EDIT
I have added some logging to my file and it doesn't seem to get past this block:
$orderClass = hikashop_get('class.order');
$order = $orderClass->loadNotification((int)$result->orderid, 'order_status_notification');
$mailClass = hikashop_get('class.mail');
$mailClass->sendMail($order->mail);
Is there anything I am missing to be able to use these functions in an external file?