Jump to content

Order details (or invoice) in every status email


haunter

Recommended Posts

Is there any way to put this into email template?

In order_conf.html is not problem ( email is sending straight from payment modules ). But our customer want to have order details in every email.. Do I need to edit administration?

Link to comment
Share on other sites

Yess!! Solved!!!

 

In Admin/AdminOrders.php I paste code from classes/PaymentModule.php after

'{bankwire_address}' => (Configuration::get('BANK_WIRE_ADDRESS') ? nl2br(Configuration::get('BANK_WIRE_ADDRESS')) : ''));

(around row 137)

else {
								    // poslani detailů objednávky po vychystani zbozi
								    $invoice = new Address((int)($order->id_address_invoice));
 $delivery = new Address((int)($order->id_address_delivery));
 $carrier = new Carrier((int)($order->id_carrier), $order->id_lang);
 $delivery_state = $delivery->id_state ? new State((int)($delivery->id_state)) : false;
 $invoice_state = $invoice->id_state ? new State((int)($invoice->id_state)) : false;
 $templateVars = array(
 '{firstname}' => $customer->firstname,
 '{lastname}' => $customer->lastname,
 '{email}' => $customer->email,
 '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"),
 '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"),
 '{delivery_block_html}' => $this->_getFormatedAddress($delivery, "<br />",
  array(
   'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>',
   'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')),
 '{invoice_block_html}' => $this->_getFormatedAddress($invoice, "<br />",
  array(
   'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>',
   'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')),
 '{delivery_company}' => $delivery->company,
 '{delivery_firstname}' => $delivery->firstname,
 '{delivery_lastname}' => $delivery->lastname,
 '{delivery_address1}' => $delivery->address1,
 '{delivery_address2}' => $delivery->address2,
 '{delivery_city}' => $delivery->city,
 '{delivery_postal_code}' => $delivery->postcode,
 '{delivery_country}' => $delivery->country,
 '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '',
 '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile,
 '{delivery_other}' => $delivery->other,
 '{invoice_company}' => $invoice->company,
 '{invoice_vat_number}' => $invoice->vat_number,
 '{invoice_firstname}' => $invoice->firstname,
 '{invoice_lastname}' => $invoice->lastname,
 '{invoice_address2}' => $invoice->address2,
 '{invoice_address1}' => $invoice->address1,
 '{invoice_city}' => $invoice->city,
 '{invoice_postal_code}' => $invoice->postcode,
 '{invoice_country}' => $invoice->country,
 '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
 '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile,
 '{invoice_other}' => $invoice->other,
 '{order_name}' => sprintf("#%06d", (int)($order->id)),
 '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)($order->id_lang), 1),
 '{carrier}' => $carrier->name,
 '{payment}' => Tools::substr($order->payment, 0, 32),
 '{products}' => $productsList,
 '{discounts}' => $discountsList,
 '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false),
 '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false),
 '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false),
 '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false),
 '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false));
								    }

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...