To amplify the existing email, one way to do it is this:
/includes/classes/observers/class.orderDetailAttributeTextInserter.php
Code:
<?php/**
* Observer class suitable for v1.5.3+
*/
class orderDetailAttributeTextInserter extends base {
function __construct() {
$this->attach($this, array('NOTIFY_ORDER_DURING_CREATE_ADD_PRODUCTS'));
}
function update(&$order, $eventID, $i, &$custom_insertable_text) {
$product = $order->products[$i];
if ($product['id'] == 123456) {
$custom_insertable_text = "Special care and handling instructions go here.\nAdd new lines using the backslash and 'n' character: \nand be sure to escape any double-quotes with a preceding backslash too.";
}
}
}
and
/includes/auto_loaders/config.orderDetailAttributeTextInserter.php
Code:
<?php
/**
* point 200 is suitable for order-class activities because there are minimal dependencies
*/
$autoLoadConfig[200][] = array('autoType'=>'class',
'loadFile'=> 'class.orderDetailAttributeTextInserter.php');
$autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
'className'=>'orderDetailAttributeTextInserter',
'objectName'=>'orderDetailAttributeTextInserter');
Bookmarks