Added the SILK icon set, also added the affiliate admin stuff.
git-svn-id: http://svn.cleancode.org/svn/pickles@110 4d10bc64-7434-11dc-a737-d2d0f8310089
|
@ -207,11 +207,13 @@ class Controller extends Object {
|
|||
$display->cache_id = $module['object']->getCacheID();
|
||||
}
|
||||
|
||||
/*
|
||||
if (isset($mailer->message)) {
|
||||
$status = $mailer->send();
|
||||
$module['object']->setPublic('type', $status['type']);
|
||||
$module['object']->setPublic('message', $status['message']);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// If the loaded module has a name, use it to override
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Joshua John Sherman <josh@phpwithpickles.org>
|
||||
* @copyright Copyright 2007, 2008 Joshua John Sherman
|
||||
* @copyright Copyright 2007, 2008, 2009 Joshua John Sherman
|
||||
* @link http://phpwithpickles.org
|
||||
* @license http://www.gnu.org/copyleft/lesser.html
|
||||
* @package PICKLES
|
||||
|
@ -27,75 +27,40 @@
|
|||
/**
|
||||
* Mailer Class
|
||||
*
|
||||
* Handles mailing messages from within PICKLES. Mailer data is
|
||||
* loaded into the object (each model has one) and after everything
|
||||
* is done loading, it will automatically send out the email.
|
||||
* Handles mailing messages from within PICKLES. Modules interact with the
|
||||
* Mailer object directly (each module has an instance) to send mail.
|
||||
*
|
||||
* @todo Logic needs to be cleaned up a bit (it's just sloppy since
|
||||
* the conversion from Mail();
|
||||
* @todo Add a Pickles config to allow for overrides (i.e. email goes to a
|
||||
* developer's email account instead of the actual account passed in)
|
||||
*/
|
||||
class Mailer extends Object {
|
||||
|
||||
public function __construct(Config $config, Error $error) {
|
||||
parent::__construct();
|
||||
$this->config = $config;
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends an email message
|
||||
*
|
||||
* @param array $recipients An array of recipients (optional)
|
||||
* @param string $prefix Prefix to use on the subject line (optional)
|
||||
* @param mixed $to String, object or array representing the recipient(s)
|
||||
* @param mixed $from String object or array representing the sender
|
||||
* @param string $subject Subject line for the email
|
||||
* @param string $message The body of the email
|
||||
* @return array An associative array with a status type and message
|
||||
*/
|
||||
public function send() {
|
||||
public function send($to, $from, $subject, $message) {
|
||||
|
||||
// Gets the values (is any) set in the config
|
||||
$defaults = $this->config->contact;
|
||||
// Converts the recipients into a usable string format
|
||||
if (is_object($to)) { $this->object2array($to); }
|
||||
if (is_array($to)) { $this->array2string($to); }
|
||||
|
||||
// Converts the from variable into a usable string format
|
||||
if (is_object($from)) { $this->object2array($from); }
|
||||
if (is_array($from)) { $this->array2string($from); }
|
||||
|
||||
// Pulls the recipients from the config
|
||||
if (!isset($this->recipients)) { // && isset($defaules->recipients->recipient)) {
|
||||
$this->recipients = $defaults->recipients->recipient;
|
||||
}
|
||||
|
||||
// Loads up the "to" value
|
||||
if (is_object($this->recipients)) {
|
||||
$to = null;
|
||||
foreach ($this->recipients as $recipient) {
|
||||
$to .= (isset($to) ? ',' : '') . (string)$recipient;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$to = $this->recipients;
|
||||
}
|
||||
|
||||
// Loads the subject line prefix
|
||||
$prefix = isset($this->prefix) ? $this->prefix : (isset($defaults->prefix) && $defaults->prefix != '' ? $defaults->prefix : null);
|
||||
|
||||
// Assembles the subject line with prefix
|
||||
$subject = strtr((isset($prefix) ? '[' . $prefix . '] ' : ''), "\n", '');
|
||||
|
||||
// Tacks on the subject
|
||||
if (isset($this->subject)) {
|
||||
$subject .= $this->subject;
|
||||
}
|
||||
else if (isset($defaults->subjec)) {
|
||||
$subject .= $defaults->subject;
|
||||
}
|
||||
|
||||
// Puts together the sender's contact info in name <email> format
|
||||
if (isset($this->name)) {
|
||||
$from = $this->name . ' <' . $this->email . '>';
|
||||
}
|
||||
else {
|
||||
$from = $this->email;
|
||||
}
|
||||
// Constructs the header
|
||||
$additional_headers = "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nFrom: {$from}\r\nX-Mailer: PHP with PICKLES\r\n";
|
||||
|
||||
// Sends the mail
|
||||
if (mail($to, $subject, stripslashes($this->message), "From: {$from}\r\nX-Mailer: PHP with PICKLES\r\n")) {
|
||||
if (mail($to, stripslashes(trim($subject)), stripslashes(trim($message)), $additional_headers)) {
|
||||
$type = 'success';
|
||||
$message = isset($defaults['response']) ? $defaults['response'] : 'Message sent successfully';
|
||||
$message = 'Message sent successfully';
|
||||
}
|
||||
else {
|
||||
$type = 'error';
|
||||
|
@ -104,13 +69,63 @@ class Mailer extends Object {
|
|||
|
||||
Logger::write('mailer', '[' . $type . ']');
|
||||
|
||||
// Builds the status array to be returned
|
||||
$return = array(
|
||||
// Returns the status array
|
||||
return array(
|
||||
'type' => $type,
|
||||
'message' => $message
|
||||
);
|
||||
}
|
||||
|
||||
return $return;
|
||||
/**
|
||||
* Converts an object to an array
|
||||
*
|
||||
* This function assumes that the object is formatted in a certain way,
|
||||
* with a name and email member variable.
|
||||
*
|
||||
* @param object $object Object to be converted
|
||||
* @return array The resulting array
|
||||
*/
|
||||
private function object2array(&$object) {
|
||||
$array = array();
|
||||
|
||||
foreach ($object as $key => $node) {
|
||||
if (isset($node->name, $node->email)) {
|
||||
$array[trim((string)$node->name)] = trim((string)$node->email);
|
||||
}
|
||||
else if (isset($node->email)) {
|
||||
$array[] = trim((string)$node->email);
|
||||
}
|
||||
else {
|
||||
$array[] = trim((string)$node);
|
||||
}
|
||||
}
|
||||
|
||||
$object = $array;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts an array to a string
|
||||
*
|
||||
* This function assumes that the array is formatted in a certain way,
|
||||
* with the name as the key and the email as the value.
|
||||
*
|
||||
* @param array $array Array to be converted
|
||||
* @return string The resulting string
|
||||
*/
|
||||
private function array2string(&$array) {
|
||||
$temp = array();
|
||||
|
||||
foreach ($array as $name => $email) {
|
||||
if (is_string($name)) {
|
||||
$temp[$name] = "{$name} <{$email}>";
|
||||
}
|
||||
else {
|
||||
$temp[] = $email;
|
||||
}
|
||||
}
|
||||
|
||||
$array = implode(', ', $temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,12 +34,6 @@
|
|||
*/
|
||||
class Module extends Object {
|
||||
|
||||
/**
|
||||
* Data array used by the display
|
||||
*/
|
||||
// @todo REMOVE THIS
|
||||
//protected $data = array();
|
||||
|
||||
/**
|
||||
* Array of public variables to be available by the display
|
||||
*/
|
||||
|
@ -202,25 +196,6 @@ class Module extends Object {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the variable in the data array
|
||||
*
|
||||
* Overrides the built-in functionality to set an object's property with
|
||||
* logic to place that data inside the data array for easier interaction
|
||||
* later on.
|
||||
*
|
||||
* @param string $variable Name of the variable to be set
|
||||
* @param mixed $value Data to be set
|
||||
* @todo REMOVE ME!
|
||||
*/
|
||||
/*
|
||||
public function __set($variable, $value) {
|
||||
if ($variable != 'cache_id') {
|
||||
$this->data[$variable] = $value;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public function setPublic($variable, $value) {
|
||||
$this->public[$variable] = $value;
|
||||
return true;
|
||||
|
|
|
@ -81,6 +81,7 @@ class WebService_AuthorizeNet_AIM extends WebService_Common {
|
|||
|
||||
public function process() {
|
||||
|
||||
// Loads the API keys based on what URL is being loaded
|
||||
if (preg_match("/{$this->config->webservices->authorizenet_aim->domain}/", $_SERVER['HTTP_HOST'])) {
|
||||
$url = $this->prod_url;
|
||||
$login = $this->config->webservices->authorizenet_aim->login;
|
|
@ -4,13 +4,28 @@ class store_admin_affiliates extends store_admin {
|
|||
|
||||
public function __default() {
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM affiliates
|
||||
SELECT
|
||||
a.id,
|
||||
a.commission_rate,
|
||||
a.order_count,
|
||||
a.unpaid_balance,
|
||||
|
||||
e.email,
|
||||
|
||||
ca.first_name,
|
||||
ca.last_name,
|
||||
ca.phone
|
||||
|
||||
FROM affiliates AS a
|
||||
INNER JOIN emails AS e ON e.id = a.email_id
|
||||
INNER JOIN addresses AS ca ON ca.id = a.contact_address_id
|
||||
|
||||
ORDER BY
|
||||
unpaid_balance DESC,
|
||||
order_count DESC
|
||||
;
|
||||
';
|
||||
|
||||
$this->setPublic('affiliates', $this->db->getArray($sql));
|
||||
}
|
||||
}
|
||||
|
|
54
common/modules/store/admin/affiliates/edit.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
class store_admin_affiliates_edit extends store_admin {
|
||||
|
||||
protected $display = array(DISPLAY_SMARTY, DISPLAY_JSON);
|
||||
|
||||
public function __default() {
|
||||
|
||||
if (isset($_REQUEST['id'])) {
|
||||
$sql = "
|
||||
SELECT
|
||||
a.id,
|
||||
a.tax_id,
|
||||
a.tax_class,
|
||||
a.commission_rate,
|
||||
|
||||
e.email,
|
||||
|
||||
ca.company AS contact_company,
|
||||
ca.first_name AS contact_first_name,
|
||||
ca.last_name AS contact_last_name,
|
||||
ca.address1 AS contact_address1,
|
||||
ca.address2 AS contact_address2,
|
||||
ca.city AS contact_city,
|
||||
ca.state AS contact_state,
|
||||
ca.zip_code AS contact_zip_code,
|
||||
ca.phone AS contact_phone,
|
||||
ca.fax AS contact_fax,
|
||||
|
||||
pa.company AS payee_company,
|
||||
pa.first_name AS payee_first_name,
|
||||
pa.last_name AS payee_last_name,
|
||||
pa.address1 AS payee_address1,
|
||||
pa.address2 AS payee_address2,
|
||||
pa.city AS payee_city,
|
||||
pa.state AS payee_state,
|
||||
pa.zip_code AS payee_zip_code,
|
||||
pa.phone AS payee_phone,
|
||||
pa.fax AS payee_fax
|
||||
|
||||
FROM affiliates AS a
|
||||
INNER JOIN emails AS e ON e.id = a.email_id
|
||||
INNER JOIN addresses AS ca ON ca.id = a.contact_address_id
|
||||
INNER JOIN addresses AS pa ON pa.id = a.payee_address_id
|
||||
|
||||
WHERE a.id = '{$_REQUEST['id']}';
|
||||
";
|
||||
|
||||
$this->setPublic('affiliate', $this->db->getRow($sql));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
156
common/modules/store/admin/affiliates/save.php
Normal file
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
class store_admin_affiliates_save extends store_admin {
|
||||
|
||||
protected $display = DISPLAY_JSON;
|
||||
|
||||
public function __default() {
|
||||
|
||||
// Adds the contact information into the database
|
||||
if (isset($_REQUEST['contact_address1']) && trim($_REQUEST['contact_address1']) != '') {
|
||||
$contact_address = array(
|
||||
'company' => $_REQUEST['contact_company'],
|
||||
'first_name' => $_REQUEST['contact_first_name'],
|
||||
'last_name' => $_REQUEST['contact_last_name'],
|
||||
'address1' => $_REQUEST['contact_address1'],
|
||||
'address2' => $_REQUEST['contact_address2'],
|
||||
'city' => $_REQUEST['contact_city'],
|
||||
'state' => $_REQUEST['contact_state'],
|
||||
'zip_code' => $_REQUEST['contact_zip_code'],
|
||||
'country' => 'US',
|
||||
'phone' => $_REQUEST['contact_phone'],
|
||||
'fax' => $_REQUEST['contact_fax']
|
||||
);
|
||||
|
||||
$contact_address['hash'] = md5(implode('', $contact_address));
|
||||
|
||||
if ($this->db->getField("SELECT COUNT(*) FROM addresses WHERE hash = '{$contact_address['hash']}';") == 0) {
|
||||
$contact_address_id = $this->db->insert('addresses', $contact_address);
|
||||
}
|
||||
else {
|
||||
$contact_address = $this->db->getRow("SELECT * FROM addresses WHERE hash = '{$contact_address['hash']}';");
|
||||
$contact_address_id = $contact_address['id'];
|
||||
}
|
||||
}
|
||||
|
||||
// Adds the payee information into the database
|
||||
$payee_address_id = null;
|
||||
|
||||
if (isset($_REQUEST['payee_same_as_contact']) && $_REQUEST['payee_same_as_contact'] == 'on') {
|
||||
$payee_address_id = $contact_address_id;
|
||||
$payee_address = $contact_address;
|
||||
}
|
||||
else if (isset($_REQUEST['payee_address1']) && trim($_REQUEST['payee_address1']) != '') {
|
||||
$payee_address = array(
|
||||
'company' => $_REQUEST['payee_company'],
|
||||
'first_name' => $_REQUEST['payee_first_name'],
|
||||
'last_name' => $_REQUEST['payee_last_name'],
|
||||
'address1' => $_REQUEST['payee_address1'],
|
||||
'address2' => $_REQUEST['payee_address2'],
|
||||
'city' => $_REQUEST['payee_city'],
|
||||
'state' => $_REQUEST['payee_state'],
|
||||
'zip_code' => $_REQUEST['payee_zip_code'],
|
||||
'country' => 'US',
|
||||
'phone' => $_REQUEST['payee_phone'],
|
||||
'fax' => $_REQUEST['payee_fax']
|
||||
);
|
||||
|
||||
$payee_address['hash'] = md5(implode('', $payee_address));
|
||||
|
||||
if ($this->db->getField("SELECT COUNT(*) FROM addresses WHERE hash = '{$payee_address['hash']}';") == 0) {
|
||||
$payee_address_id = $this->db->insert('addresses', $payee_address);
|
||||
}
|
||||
else {
|
||||
$payee_address = $this->db->getRow("SELECT * FROM addresses WHERE hash = '{$payee_address['hash']}';");
|
||||
$payee_address_id = $payee_address['id'];
|
||||
}
|
||||
}
|
||||
|
||||
// Adds the affiliate's email into the email database
|
||||
if (isset($_REQUEST['email']) && trim($_REQUEST['email']) != '') {
|
||||
$email = $_REQUEST['email'];
|
||||
|
||||
if ($this->db->getField("SELECT COUNT(*) FROM emails WHERE email = '{$email}';") == 0) {
|
||||
$email_id = $this->db->insert('emails', array('email' => $email));
|
||||
}
|
||||
else {
|
||||
$email_id = $this->db->getField("SELECT id FROM emails WHERE email = '{$email}';");
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the existing affiliate
|
||||
if (isset($_REQUEST['id'])) {
|
||||
|
||||
$affiliate = array(
|
||||
'email_id' => $email_id,
|
||||
'contact_address_id' => $contact_address_id,
|
||||
'payee_address_id' => $payee_address_id,
|
||||
'tax_id' => $_REQUEST['tax_id'],
|
||||
'tax_class' => $_REQUEST['tax_class'],
|
||||
'commission_rate' => $_REQUEST['commission_rate']
|
||||
);
|
||||
|
||||
$this->db->update('affiliates', $affiliate, array('id' => $_REQUEST['id']));
|
||||
|
||||
if ($this->error->getErrors()) {
|
||||
$this->setPublic('status', 'Error');
|
||||
$this->setPublic('message', 'There was an error updating the affiliate account (' . implode('. ', $this->error->getErrors()) . '.)');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$this->setPublic('status', 'Success');
|
||||
$this->setPublic('message', 'The affiliate information has been updated successfully.');
|
||||
}
|
||||
}
|
||||
// Adds a brand new affiliate
|
||||
else {
|
||||
$affiliate = array(
|
||||
'email_id' => $email_id,
|
||||
'contact_address_id' => $contact_address_id,
|
||||
'payee_address_id' => $payee_address_id,
|
||||
'tax_id' => $_REQUEST['tax_id'],
|
||||
'tax_class' => $_REQUEST['tax_class'],
|
||||
'date_started' => date('Y-m-d'),
|
||||
'commission_rate' => $_REQUEST['commission_rate']
|
||||
);
|
||||
|
||||
$affiliate_id = $this->db->insert('affiliates', $affiliate);
|
||||
|
||||
if ($this->error->getErrors()) {
|
||||
$this->setPublic('status', 'Error');
|
||||
$this->setPublic('message', 'There was an error adding the affiliate account (' . implode('. ', $this->error->getErrors()) . '.)');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$affiliate_message = "
|
||||
{$this->config->store->title} Affiliate Program
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Dear {$contact_address['first_name']} {$contact_address['last_name']},
|
||||
|
||||
You have been registered
|
||||
|
||||
Your custom URL:
|
||||
---------------------
|
||||
{$this->config->store->url}/referral/" . md5($affiliate_id) . "
|
||||
|
||||
------------------
|
||||
|
||||
Thank you for your interest in the {$this->config->store->title} Affiliate Program.
|
||||
|
||||
{$this->config->store->title}
|
||||
Phone: {$this->config->store->phone}
|
||||
Fax: {$this->config->store->fax}
|
||||
URL: {$this->config->store->url}
|
||||
";
|
||||
|
||||
mail($_REQUEST['email'], 'Welcome to the ' . $this->config->store->title . ' Affiliate Program', $affiliate_message, 'From: ' . $this->config->store->return_email);
|
||||
|
||||
$this->setPublic('status', 'Success');
|
||||
$this->setPublic('message', 'The new affiliate has been added successfully.');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -180,10 +180,8 @@ class store_checkout extends store {
|
|||
$cart['email'] = $email;
|
||||
|
||||
// Contacts the user to advise them of their sign up
|
||||
// @todo This is as MenoSol specific as it gets
|
||||
// @todo Swap out for the mailer class as well, then I can trap the sends and override for testing.
|
||||
mail($email, 'Welcome to Menopause Solutions', "
|
||||
Menopause Solutions
|
||||
$registration_message = "
|
||||
{$this->config->store->title}
|
||||
-------------------------------------------------------------------
|
||||
|
||||
Dear {$shipping_address['first_name']} {$shipping_address['last_name']},
|
||||
|
@ -227,13 +225,24 @@ Fax: {$shipping_address['fax']}
|
|||
|
||||
------------------
|
||||
|
||||
Thank you for your interest in Menopause Solutions.
|
||||
Thank you for your interest in {$this->config->store->title}.
|
||||
|
||||
Menopause Solutions
|
||||
Phone: 1-800-895-4415
|
||||
Fax: 813-925-1066
|
||||
URL: http://www.menopausesolutions.net
|
||||
", 'From: noreply@menopausesolutions.net');
|
||||
{$this->config->store->title}
|
||||
Phone: {$this->config->store->phone}
|
||||
Fax: {$this->config->store->fax}
|
||||
URL: {$this->config->store->url}
|
||||
";
|
||||
|
||||
// @todo
|
||||
mail($email, 'Welcome to ' . $this->config->store->title, $registration_message, 'From: ' . $this->config->store->return_email);
|
||||
/*
|
||||
$status = $this->mailer->send(
|
||||
$email,
|
||||
$this->config->store->return_email,
|
||||
'Welcome to ' . $this->config->store->title,
|
||||
$registration_message
|
||||
);
|
||||
*/
|
||||
}
|
||||
else {
|
||||
// @todo Change this out for a confirmation box and re-submit
|
||||
|
@ -277,6 +286,14 @@ URL: http://www.menopausesolutions.net
|
|||
$this->setPublic('message', 'There was an internal error.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$affiliate_id = null;
|
||||
if (isset($cart['affiliate'])) {
|
||||
if ($this->db->getField("SELECT COUNT(id) FROM affiliates WHERE MD5(id) = '{$cart['affiliate']}';") == 1) {
|
||||
$affiliate = $this->db->getRow("SELECT id, commission_rate FROM affiliates WHERE MD5(id) = '{$cart['affiliate']}';");
|
||||
$affiliate_id = $affiliate['id'];
|
||||
}
|
||||
}
|
||||
|
||||
// Assembles the order array
|
||||
$order = array(
|
||||
|
@ -285,7 +302,7 @@ URL: http://www.menopausesolutions.net
|
|||
'shipping_address_id' => $shipping_address_id,
|
||||
'billing_address_id' => $billing_address_id,
|
||||
'referrer_id' => $referrer_id,
|
||||
'affiliate_id' => isset($cart['affiliate']) ? $cart['affiliate'] : null,
|
||||
'affiliate_id' => $affiliate_id,
|
||||
'cc_type' => isset($_REQUEST['cc_type']) ? $_REQUEST['cc_type'] : null,
|
||||
'cc_last4' => isset($_REQUEST['cc_number']) ? substr($_REQUEST['cc_number'], -4) : null,
|
||||
'cc_expiration' => isset($_REQUEST['cc_expiration']) ? '20' . $_REQUEST['cc_expiration']['year'] . '-' . $_REQUEST['cc_expiration']['month'] . '-01' : null,
|
||||
|
@ -445,12 +462,34 @@ Email : {$email}
|
|||
WHERE id = '{$response['invoice_number']}';
|
||||
");
|
||||
|
||||
// Updates the affiliates profile
|
||||
if ($affiliate_id != null) {
|
||||
$commission = round($cart['subtotal'] * ($affiliate['commission_rate'] / 100), 2);
|
||||
|
||||
$this->db->execute("
|
||||
UPDATE affiliates
|
||||
SET
|
||||
order_count = order_count + 1,
|
||||
commission_earned = commission_earned + {$commission},
|
||||
unpaid_balance = unpaid_balance + {$commission}
|
||||
WHERE id = '{$affiliate_id}';
|
||||
");
|
||||
}
|
||||
|
||||
// Does some clean up to avoid duplicate transactions
|
||||
unset($_SESSION['cart']);
|
||||
|
||||
// Emails the shipping department
|
||||
// @todo
|
||||
mail('weborders@menopausesolutions.net, tom@epuresolutions.com, joshsherman@gmail.com', 'Menopause Solutions Order Notification', $receipt, 'From: noreply@menopausesolutions.net');
|
||||
mail($this->config->store->order_notification->recipient, $this->config->store->title . ' Order Notification', $receipt, 'From: ' . $this->config->store->return_email);
|
||||
/*
|
||||
$this->mailer->send(
|
||||
$this->config->store->order_notification->recipient,
|
||||
$this->config->store->return_email,
|
||||
$this->config->store->title . ' Order Notification',
|
||||
$receipt
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
$this->setPublic('status', $response['response_code']);
|
||||
|
@ -470,11 +509,29 @@ Email : {$email}
|
|||
unset($_SESSION['cart']);
|
||||
|
||||
// Emails the user a receipt
|
||||
mail($email, 'Menopause Solutions Customer Receipt', $receipt, 'From: noreply@menopausesolutions.net');
|
||||
// @todo
|
||||
mail($email, $this->config->store->title . ' Customer Receipt', $receipt, 'From: ' . $this->config->store->return_email);
|
||||
/*
|
||||
$this->mailer->send(
|
||||
$email,
|
||||
$this->config->store->return_email,
|
||||
$this->config->store->title . ' Customer Receipt',
|
||||
$receipt,
|
||||
false
|
||||
);
|
||||
*/
|
||||
|
||||
// Emails the shipping department
|
||||
// @todo
|
||||
mail('weborders@menopausesolutions.net, tom@epuresolutions.com, joshsherman@gmail.com', 'Menopause Solutions Order Notification', $receipt, 'From: noreply@menopausesolutions.net');
|
||||
mail($this->config->store->order_notification->recipient, $this->config->store->title . ' Order Notification', $receipt, 'From: ' . $this->config->store->return_email);
|
||||
/*
|
||||
$this->mailer->send(
|
||||
$this->config->store->order_notification->recipient,
|
||||
$this->config->store->return_email,
|
||||
$this->config->store->title . ' Order Notification',
|
||||
$receipt
|
||||
);
|
||||
*/
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
BIN
common/static/contrib/silk/icons/accept.png
Normal file
After Width: | Height: | Size: 781 B |
BIN
common/static/contrib/silk/icons/add.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
common/static/contrib/silk/icons/anchor.png
Normal file
After Width: | Height: | Size: 523 B |
BIN
common/static/contrib/silk/icons/application.png
Normal file
After Width: | Height: | Size: 464 B |
BIN
common/static/contrib/silk/icons/application_add.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
common/static/contrib/silk/icons/application_cascade.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
common/static/contrib/silk/icons/application_delete.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
common/static/contrib/silk/icons/application_double.png
Normal file
After Width: | Height: | Size: 533 B |
BIN
common/static/contrib/silk/icons/application_edit.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
common/static/contrib/silk/icons/application_error.png
Normal file
After Width: | Height: | Size: 656 B |
BIN
common/static/contrib/silk/icons/application_form.png
Normal file
After Width: | Height: | Size: 467 B |
BIN
common/static/contrib/silk/icons/application_form_add.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
common/static/contrib/silk/icons/application_form_delete.png
Normal file
After Width: | Height: | Size: 605 B |
BIN
common/static/contrib/silk/icons/application_form_edit.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
common/static/contrib/silk/icons/application_form_magnify.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
common/static/contrib/silk/icons/application_get.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
common/static/contrib/silk/icons/application_go.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
common/static/contrib/silk/icons/application_home.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
common/static/contrib/silk/icons/application_key.png
Normal file
After Width: | Height: | Size: 670 B |
BIN
common/static/contrib/silk/icons/application_lightning.png
Normal file
After Width: | Height: | Size: 656 B |
BIN
common/static/contrib/silk/icons/application_link.png
Normal file
After Width: | Height: | Size: 701 B |
BIN
common/static/contrib/silk/icons/application_osx.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
common/static/contrib/silk/icons/application_osx_terminal.png
Normal file
After Width: | Height: | Size: 525 B |
BIN
common/static/contrib/silk/icons/application_put.png
Normal file
After Width: | Height: | Size: 585 B |
BIN
common/static/contrib/silk/icons/application_side_boxes.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
common/static/contrib/silk/icons/application_side_contract.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
common/static/contrib/silk/icons/application_side_expand.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
common/static/contrib/silk/icons/application_side_list.png
Normal file
After Width: | Height: | Size: 510 B |
BIN
common/static/contrib/silk/icons/application_side_tree.png
Normal file
After Width: | Height: | Size: 483 B |
BIN
common/static/contrib/silk/icons/application_split.png
Normal file
After Width: | Height: | Size: 520 B |
BIN
common/static/contrib/silk/icons/application_tile_horizontal.png
Normal file
After Width: | Height: | Size: 432 B |
BIN
common/static/contrib/silk/icons/application_tile_vertical.png
Normal file
After Width: | Height: | Size: 492 B |
BIN
common/static/contrib/silk/icons/application_view_columns.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
common/static/contrib/silk/icons/application_view_detail.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
common/static/contrib/silk/icons/application_view_gallery.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
common/static/contrib/silk/icons/application_view_icons.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
common/static/contrib/silk/icons/application_view_list.png
Normal file
After Width: | Height: | Size: 473 B |
BIN
common/static/contrib/silk/icons/application_view_tile.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
common/static/contrib/silk/icons/application_xp.png
Normal file
After Width: | Height: | Size: 426 B |
BIN
common/static/contrib/silk/icons/application_xp_terminal.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
common/static/contrib/silk/icons/arrow_branch.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
common/static/contrib/silk/icons/arrow_divide.png
Normal file
After Width: | Height: | Size: 677 B |
BIN
common/static/contrib/silk/icons/arrow_down.png
Normal file
After Width: | Height: | Size: 379 B |
BIN
common/static/contrib/silk/icons/arrow_in.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
common/static/contrib/silk/icons/arrow_inout.png
Normal file
After Width: | Height: | Size: 551 B |
BIN
common/static/contrib/silk/icons/arrow_join.png
Normal file
After Width: | Height: | Size: 626 B |
BIN
common/static/contrib/silk/icons/arrow_left.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
common/static/contrib/silk/icons/arrow_merge.png
Normal file
After Width: | Height: | Size: 484 B |
BIN
common/static/contrib/silk/icons/arrow_out.png
Normal file
After Width: | Height: | Size: 594 B |
BIN
common/static/contrib/silk/icons/arrow_redo.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
common/static/contrib/silk/icons/arrow_refresh.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
common/static/contrib/silk/icons/arrow_refresh_small.png
Normal file
After Width: | Height: | Size: 506 B |
BIN
common/static/contrib/silk/icons/arrow_right.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
common/static/contrib/silk/icons/arrow_rotate_anticlockwise.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
common/static/contrib/silk/icons/arrow_rotate_clockwise.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
common/static/contrib/silk/icons/arrow_switch.png
Normal file
After Width: | Height: | Size: 683 B |
BIN
common/static/contrib/silk/icons/arrow_turn_left.png
Normal file
After Width: | Height: | Size: 516 B |
BIN
common/static/contrib/silk/icons/arrow_turn_right.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
common/static/contrib/silk/icons/arrow_undo.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
common/static/contrib/silk/icons/arrow_up.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
common/static/contrib/silk/icons/asterisk_orange.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
common/static/contrib/silk/icons/asterisk_yellow.png
Normal file
After Width: | Height: | Size: 743 B |
BIN
common/static/contrib/silk/icons/attach.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
common/static/contrib/silk/icons/award_star_add.png
Normal file
After Width: | Height: | Size: 853 B |
BIN
common/static/contrib/silk/icons/award_star_bronze_1.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
common/static/contrib/silk/icons/award_star_bronze_2.png
Normal file
After Width: | Height: | Size: 755 B |
BIN
common/static/contrib/silk/icons/award_star_bronze_3.png
Normal file
After Width: | Height: | Size: 754 B |
BIN
common/static/contrib/silk/icons/award_star_delete.png
Normal file
After Width: | Height: | Size: 849 B |
BIN
common/static/contrib/silk/icons/award_star_gold_1.png
Normal file
After Width: | Height: | Size: 753 B |
BIN
common/static/contrib/silk/icons/award_star_gold_2.png
Normal file
After Width: | Height: | Size: 770 B |
BIN
common/static/contrib/silk/icons/award_star_gold_3.png
Normal file
After Width: | Height: | Size: 781 B |
BIN
common/static/contrib/silk/icons/award_star_silver_1.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
common/static/contrib/silk/icons/award_star_silver_2.png
Normal file
After Width: | Height: | Size: 734 B |
BIN
common/static/contrib/silk/icons/award_star_silver_3.png
Normal file
After Width: | Height: | Size: 738 B |
BIN
common/static/contrib/silk/icons/basket.png
Normal file
After Width: | Height: | Size: 669 B |
BIN
common/static/contrib/silk/icons/basket_add.png
Normal file
After Width: | Height: | Size: 752 B |
BIN
common/static/contrib/silk/icons/basket_delete.png
Normal file
After Width: | Height: | Size: 773 B |
BIN
common/static/contrib/silk/icons/basket_edit.png
Normal file
After Width: | Height: | Size: 811 B |
BIN
common/static/contrib/silk/icons/basket_error.png
Normal file
After Width: | Height: | Size: 794 B |
BIN
common/static/contrib/silk/icons/basket_go.png
Normal file
After Width: | Height: | Size: 777 B |
BIN
common/static/contrib/silk/icons/basket_put.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
common/static/contrib/silk/icons/basket_remove.png
Normal file
After Width: | Height: | Size: 738 B |
BIN
common/static/contrib/silk/icons/bell.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
common/static/contrib/silk/icons/bell_add.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
common/static/contrib/silk/icons/bell_delete.png
Normal file
After Width: | Height: | Size: 824 B |
BIN
common/static/contrib/silk/icons/bell_error.png
Normal file
After Width: | Height: | Size: 813 B |
BIN
common/static/contrib/silk/icons/bell_go.png
Normal file
After Width: | Height: | Size: 836 B |
BIN
common/static/contrib/silk/icons/bell_link.png
Normal file
After Width: | Height: | Size: 850 B |
BIN
common/static/contrib/silk/icons/bin.png
Normal file
After Width: | Height: | Size: 476 B |
BIN
common/static/contrib/silk/icons/bin_closed.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
common/static/contrib/silk/icons/bin_empty.png
Normal file
After Width: | Height: | Size: 475 B |
BIN
common/static/contrib/silk/icons/bomb.png
Normal file
After Width: | Height: | Size: 793 B |