djmila Posted March 31, 2013 Share Posted March 31, 2013 how to add customize text in mail alert in PS1.5.4 ( in mails for custome is right ) Thanks for help Link to comment Share on other sites More sharing options...
vekia Posted March 31, 2013 Share Posted March 31, 2013 all email that your prestashop sends to customers are in /mails/ directory. you've got there subdirectories /en/ /fr/ etc which are available languages in your store. So, you have to open language directory and then select mail which you want to edit and add own texts there :-) Link to comment Share on other sites More sharing options...
djmila Posted March 31, 2013 Author Share Posted March 31, 2013 email for customers is ready. My problem is in mail alert module. I want product with customize text ( this problem is solved in email for customers ) Link to comment Share on other sites More sharing options...
BWT Posted March 31, 2013 Share Posted March 31, 2013 You have to edit the files in "mail" folder if you wish to send custom text. Link to comment Share on other sites More sharing options...
djmila Posted March 31, 2013 Author Share Posted March 31, 2013 no, problem is in maialert.php ( compilation items ) $customization_text = ''; if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']])) { foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']] as $customization) { if (isset($customization['datas'][_CUSTOMIZE_TEXTFIELD_])) foreach ($customization['datas'][_CUSTOMIZE_TEXTFIELD_] as $text) $customization_text .= $text['name'].': '.$text['value'].'<br />'; if (isset($customization['datas'][_CUSTOMIZE_FILE_])) $customization_text .= count($customization['datas'][_CUSTOMIZE_FILE_]).' '.$this->l('image(s)').'<br />'; $customization_text .= '---<br />'; } $customization_text = rtrim($customization_text, '---<br />'); } $items_table .= '<tr style="background-color:'.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding:0.6em 0.4em;">'.$product['product_reference'].'</td> <td style="padding:0.6em 0.4em;"> <strong>' .$product['product_name'].(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').(!empty($customization_text) ? '<br />'.$customization_text : ''). '</strong> </td> <td style="padding:0.6em 0.4em; text-align:right;">'.Tools::displayPrice($unit_price, $currency, false).'</td> <td style="padding:0.6em 0.4em; text-align:center;">'.(int)$product['product_quantity'].'</td> <td style="padding:0.6em 0.4em; text-align:right;">'.Tools::displayPrice(($unit_price * $product['product_quantity']), $currency, false).'</td> </tr>'; } Link to comment Share on other sites More sharing options...
Fran13 Posted January 15, 2014 Share Posted January 15, 2014 I have the same problem no one has the solution? thank you Link to comment Share on other sites More sharing options...
vekia Posted January 15, 2014 Share Posted January 15, 2014 localization > translations > mail translations you will see there all available emails in your shop, also emails for mailalerts module - you can translate it there Link to comment Share on other sites More sharing options...
Fran13 Posted January 15, 2014 Share Posted January 15, 2014 thanks for your quick reply. The problem is not with the translation, the problem is that on my website have products with customized text. Please see the attachment I would like to receive email in my custom text such as in an email to the customer. Thanks Link to comment Share on other sites More sharing options...
Tia© Posted February 18, 2014 Share Posted February 18, 2014 Hi, i have a different problem with mail alerts... I can't translate the email's object. The files /mails/it/lang.php it's ok with my translations, but the module doesn't use it. If i change the file /themes/mytheme/mails/it/lang.php and add the objects like $_LANGMAIL['New voucher regarding your order %s'] = 'Nuovo buono sconto riguardante il tuo ordine %s'; it works fine. Ok i am happy but.... whenever i translate the body of the mail form BO localization > translations > mail translations the lang.php file is reset and lost my mods. How can i do? Thank you to all! P.s.: 1.5.6.1 Link to comment Share on other sites More sharing options...
Tia© Posted February 24, 2014 Share Posted February 24, 2014 up Link to comment Share on other sites More sharing options...
Guest Conprestador Posted February 24, 2014 Share Posted February 24, 2014 Hi, i have a different problem with mail alerts... I can't translate the email's object. The files /mails/it/lang.php it's ok with my translations, but the module doesn't use it. If i change the file /themes/mytheme/mails/it/lang.php and add the objects like $_LANGMAIL['New voucher regarding your order %s'] = 'Nuovo buono sconto riguardante il tuo ordine %s'; it works fine. Ok i am happy but.... whenever i translate the body of the mail form BO localization > translations > mail translations the lang.php file is reset and lost my mods. How can i do? Thank you to all! P.s.: 1.5.6.1 It makes a difference if you choose localization --> translations --> Email template translations" --> "core (no theme selected)" or localization --> translations --> Email template translations" --> <your_themes> Link to comment Share on other sites More sharing options...
Tia© Posted February 24, 2014 Share Posted February 24, 2014 Hi, thank you for reply. I know that it's different but if i choose localization --> translations --> Email template translations" --> <your_themes> the subjects don't change Link to comment Share on other sites More sharing options...
Guest Conprestador Posted February 24, 2014 Share Posted February 24, 2014 thanks for your quick reply. The problem is not with the translation, the problem is that on my website have products with customized text. Please see the attachment I would like to receive email in my custom text such as in an email to the customer. Thanks mailalerets.php contains some bugs. line 5 of above code by djimila should be foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']][$order->id_address_delivery] as $customization) Instead of line 17 you should write $customization_text .= '---<br />'; } if (method_exists('Tools', 'rtrimString')) $customization_text = Tools::rtrimString($customization_text, '---<br />'); else $customization_text = preg_replace('/---<br \/>$/', '', $customization_text); } Link to comment Share on other sites More sharing options...
Recommended Posts