thabisomak Posted April 16, 2017 Share Posted April 16, 2017 Hi Guys I have have around 7 different attributes for the products in my store. The order confirmation email currently displays all the attributes on one line separated by commas. I would like to change this to list each attribute on a new line. Can anyone help me achieve this? I'm running Prestashop 1.6.1.10 Thanks Link to comment Share on other sites More sharing options...
electrostuff_de Posted April 16, 2017 Share Posted April 16, 2017 The attributes are seperated in a foreach-function. You can replace the seperator "," with "\n" for a linebreak. Link to comment Share on other sites More sharing options...
thabisomak Posted April 17, 2017 Author Share Posted April 17, 2017 The attributes are seperated in a foreach-function. You can replace the seperator "," with "\n" for a linebreak. Thanks for your response. I have tried to locate the separator in PaymentsModule.php and I cannot find it. Am I maybe looking in the wrong place? Link to comment Share on other sites More sharing options...
electrostuff_de Posted April 18, 2017 Share Posted April 18, 2017 Thanks for your response. I have tried to locate the separator in PaymentsModule.php and I cannot find it. Am I maybe looking in the wrong place? $customization_text .= $text['name'].': '.$text['value'].'<br />'; in classes/PaymentModule.php in Line 478 you have the '<br />' tag, this makes sure, that html-mails get a linebreak. Try adding a "\n" for textmails, so it has to look like: $customization_text .= $text['name'].': '.$text['value'].'<br />\n'; Not tested, but this should do the trick. Link to comment Share on other sites More sharing options...
thabisomak Posted April 18, 2017 Author Share Posted April 18, 2017 $customization_text .= $text['name'].': '.$text['value'].'<br />'; in classes/PaymentModule.php in Line 478 you have the '<br />' tag, this makes sure, that html-mails get a linebreak. Try adding a "\n" for textmails, so it has to look like: $customization_text .= $text['name'].': '.$text['value'].'<br />\n'; Not tested, but this should do the trick. Unfortunately this doesn't work. It refers to the product 'Customization' rather than the Attributes. Link to comment Share on other sites More sharing options...
electrostuff_de Posted April 18, 2017 Share Posted April 18, 2017 well, there is just 1 more output for the product attributes in 464: 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : ''), Try this: 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'].'\n'. : ''), Link to comment Share on other sites More sharing options...
thabisomak Posted April 18, 2017 Author Share Posted April 18, 2017 well, there is just 1 more output for the product attributes in 464: 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'] : ''), Try this: 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'].'\n'. : ''), This gives an HTTP ERROR 500 message when loading the checkout page. Link to comment Share on other sites More sharing options...
thabisomak Posted April 18, 2017 Author Share Posted April 18, 2017 This gives an HTTP ERROR 500 message when loading the checkout page. Okay this was a result of the second dot after the . '\n' I edited the code as below. All it did was place the text \n at the end of the list of attributes. 'name' => $product['name'].(isset($product['attributes']) ? ' - '.$product['attributes'].'\n' : ''), 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