canelones Posted June 2, 2016 Share Posted June 2, 2016 Prestashop 1.6 I enabled the B2B feature to allow the costumer to enter his Company Name. It works fine. Now I need to show that "Company Name" in the "new order" email that the administrator receives when a new order is created. What I have done do so far: 1 - In Localization/Translation/Email templates for my theme I edited the "new order" email and add the variable (token): {company} See the capture. 2- In Localization/Countries I edited the only enabled country (which is Spain) to add 'company' to Address format. See the capture. Problem is that the email shows the text {company} instead of its value. e.x: Acme, Apple... What am I missing here? Link to comment Share on other sites More sharing options...
shokinro Posted June 3, 2016 Share Posted June 3, 2016 In order to use parameters like {company} in your email template, you have prepare the parameter data that passed to the Mail::send(). You will need to modify the mailalert module to add the {company} to the parameter data array so that it will show up on your email. Link to comment Share on other sites More sharing options...
canelones Posted June 3, 2016 Author Share Posted June 3, 2016 Can you please provide me the steps to do that? Thanks. This should be easier imho. Link to comment Share on other sites More sharing options...
rocky Posted June 4, 2016 Share Posted June 4, 2016 Try changing lines 344-345 of modules/mailalerts/mailalerts.php from: $template_vars = array( '{firstname}' => $customer->firstname, to: $template_vars = array( '{company}' => $customer->company, '{firstname}' => $customer->firstname, Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now