PLEASE NOTE:
This is only for prestashop 1.3x. (No chnages are required for PrestaShop 1.4x or higher)
After version 1.2.2, the Agile PrestaShop Pickup Center module has added following feaures (since 2012.03.12):
* You are able to indlude pickup locations in the order confirmation email
* You can set an email for pickup location
* The order confirmation email will also be sent to the pickup locations if there is email address set for the location
Those feature will be available automatically without any changes for PrestaShop 1.4x or higher versions. However, if you are using PrestaShop 1.3x, you will need to manually make some code changes to enable these new features.
Pickup location inlcuded in order confirmation email, also send to pickup location if there is an email address set for the location:
Please follow the instructions below to modify the PaymentModule.php file.
File location:
YourStoreRoot/classes/PaymentModule.php
Look for the following two lines in the validateOrder() function:
if (Validate::isEmail($customer->email))
Mail::Send((int)($order->id_lang), 'order_conf', Mail::l('Order confirmation'), $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);
Insert followinfg lines of code BEFORE the above lines of code:
///begin-Agile Pickup center module pickup location hookup
{
require_once(_PS_ROOT_DIR_ . "/modules/agilepickupcenter/agilepickupcenter.php");
$amodule = new AgilePickupCenter();
$data = $amodule->transform_mail_data($data);
if(isset($data['{carrier_email}']) AND Validate::isEmail($data['{carrier_email}']))
Mail::Send((int)$order->id_lang, 'order_conf', Mail::l('Order confirmation', $order->id_lang), $data, $data['{carrier_email}'], $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment);
}
You should be all set.
The location informaiton will be included with the carrier information in the order confirmation email.