simsydney Posted May 21, 2014 Share Posted May 21, 2014 Hi Guys, i need to display the company name in the new order notification. i have no idea how to do that. thank you Link to comment Share on other sites More sharing options...
NemoPS Posted May 21, 2014 Share Posted May 21, 2014 DO you mean the new order notification email the owner gets when an order is placed? Or the one a customer gets? Also, is the company name the site name as well? Because if so, it should be there already. Link to comment Share on other sites More sharing options...
vekia Posted May 21, 2014 Share Posted May 21, 2014 go to localization > translations tab from first dropdown select "e-mail translations", from second theme, then language you will see there page to edit email translations, search for email you want to translate and then - add there any content you want there. Link to comment Share on other sites More sharing options...
simsydney Posted May 22, 2014 Author Share Posted May 22, 2014 hi guys i need the customer company name show on the new email notification email for the admin Link to comment Share on other sites More sharing options...
vekia Posted May 22, 2014 Share Posted May 22, 2014 company name of your company? or of customers company? Link to comment Share on other sites More sharing options...
simsydney Posted May 22, 2014 Author Share Posted May 22, 2014 customer company Link to comment Share on other sites More sharing options...
NemoPS Posted May 23, 2014 Share Posted May 23, 2014 Well it depends on where you're storing it. Are you using the customer table or the address one? Link to comment Share on other sites More sharing options...
simsydney Posted May 24, 2014 Author Share Posted May 24, 2014 Can i say i do not know.... i am not good on this ... I ve been able to add company name in the registration form, and also the customer company name is visible from the admin. i need to show the same data in the admin new email notification for new order. this is the url www.amtlaser.com.au Link to comment Share on other sites More sharing options...
NemoPS Posted May 24, 2014 Share Posted May 24, 2014 It's hard to even approximately give you any tip without knowing that Link to comment Share on other sites More sharing options...
webdev0008 Posted May 24, 2014 Share Posted May 24, 2014 Hi you can add customer company in new order email by adding the template variable in modules/mailalerts/mailalerts.php. Add $template_vars['{customer_company}'] = $customer->company; below where $template_vars array is defined in hookActionValidateOrder function of modules/mailalerts/mailalerts.php. so the code look like $template_vars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_block_txt}' => MailAlert::getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => MailAlert::getFormatedAddress($delivery, '<br />', array( 'firstname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>')), '{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '<br />', array( 'firstname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].' font-weight:bold;">%s</span>', 'lastname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; 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_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}' => $order->reference, '{shop_name}' => $configuration['PS_SHOP_NAME'], '{date}' => $order_date_text, '{carrier}' => (($carrier->name == '0') ? $configuration['PS_SHOP_NAME'] : $carrier->name), '{payment}' => Tools::substr($order->payment, 0, 32), '{items}' => $items_table, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency), '{total_products}' => Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency), '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $currency, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), '{currency}' => $currency->sign, '{message}' => $message ); $template_vars['{customer_company}'] = $customer->company; and use {customer_company} in new_order email template where you want to display the customer company. 1 Link to comment Share on other sites More sharing options...
simsydney Posted May 26, 2014 Author Share Posted May 26, 2014 Hi, thanks for the help, but is not showing the client company name Link to comment Share on other sites More sharing options...
NemoPS Posted May 28, 2014 Share Posted May 28, 2014 Is it showing anything at all? Link to comment Share on other sites More sharing options...
simsydney Posted May 29, 2014 Author Share Posted May 29, 2014 nope:( i notice, the notification email template change when i use different payment mothod es i am testing pay by check. maybe i need to work on this template? Link to comment Share on other sites More sharing options...
NemoPS Posted May 29, 2014 Share Posted May 29, 2014 You mean the admin email changes? that's weird, customers are supposed to get 2 (payment and order confirmation) but admin is only supposed to get the one from mailalerts! How does it change? Link to comment Share on other sites More sharing options...
Recommended Posts