Try this:
1. copy your 2 pdf files into the /download folder
2. add 2 new files to your server, as shown below:
a) /includes/classes/observers/class.zcObserverAttachTermsConditionsToOrderConfirmation.php
Code:
<?php/**
* @package plugins
* @copyright Copyright 2003-2014 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Jul 08 2014 $
*
* Designed for v1.5.1 thru 1.6.0
*/
class zcObserverAttachTermsConditionsToOrderConfirmation extends base {
function __construct() {
$this->attach($this, array('NOTIFY_ORDER_INVOICE_CONTENT_READY_TO_SEND'));
}
function update(&$callingClass, $eventID)
{
$callingClass->attachArray = array(
array('file' => DIR_FS_CATALOG . 'download/returns.pdf', // you can put the actual server filename here
'name' => 'ReturnInstructions.pdf', // this is the name you want the attachment file have in the email (can be the same as above if desired)
'mime-type' => 'application/pdf',
),
array('file' => DIR_FS_CATALOG . 'download/tos.pdf', // put actual server filename here
'name' => 'TermsOfService.pdf', // put friendly name here
'mime-type' => 'application/pdf',
),
);
}
}
b) /includes/auto_loaders/config.zcObserverAttachTermsConditionsToOrderConfirmation.php
Code:
<?php
/**
*
* @package plugins
* @copyright Copyright 2003-2014 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Jul 08 2014 $
*/
/**
* Designed for v1.5.1 thru 1.6.0
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$autoLoadConfig[200][] = array('autoType'=>'class',
'loadFile'=>'observers/class.zcObserverAttachTermsConditionsToOrderConfirmation.php');
$autoLoadConfig[200][] = array('autoType'=>'classInstantiate',
'className'=>'zcObserverAttachTermsConditionsToOrderConfirmation',
'objectName'=>'zcObserverAttachTermsConditionsToOrderConfirmation');
Bookmarks