cupK Posted August 27, 2010 Share Posted August 27, 2010 Hello.I am using 1.3 prestashop.Under shipping, I have "gift wrapping" check box that customer can check. If they check the checkbox, a empty text field opens up so that they can add a gift message if they want to.I am using mailalert module. Order summary by email shows customer message (that is first text field where customer can add any messages to the store.) , but there is no "gift message." shown.I would like to edit this email so that it alerts me 1. Customer wants gift wrapping2. What message customers want us to include with gifts.I tried to go mailalerts/mails/en/new_order.html and edit html, but no success.I think {gift_message} needs to be defined somewhere else, but I don't know.Can someone help me? Hope you understand my question.thank you! Link to comment Share on other sites More sharing options...
rocky Posted August 27, 2010 Share Posted August 27, 2010 You need to change line 345 of classes/PaymentModule.php (in PrestaShop v1.3.1) from: '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false)); to: '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false), '{gift_message}' => $order->gift_message)); Then you can use {gift_message} in order_conf.html and order_conf.txt. Link to comment Share on other sites More sharing options...
cupK Posted August 30, 2010 Author Share Posted August 30, 2010 Thank you very much.I don't know where order_conf.html and order_conf.txt are.I edited new_order.html, but it did not work......it just shows {gift_message}....Can you tell e what else I can do?By the way, I want gift message and gift wrapping option on my order notice email as well as order confirmation.hope you understand. Sorry about my english.thanks! Link to comment Share on other sites More sharing options...
rocky Posted August 30, 2010 Share Posted August 30, 2010 My code above will add the gift wrapping message to the order confirmation email. It is in mails//order_conf.html and order_conf.txt. To add it to the "New Order" email, you'll need to edit modules/mailalerts/mailalerts.php and change line 169 from: '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), to: '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), '{gift_message}' => $order->gift_message, Then you can use {gift_message} in modules/mailalerts/mails//new_order.html and new_order.txt. Link to comment Share on other sites More sharing options...
cupK Posted August 30, 2010 Author Share Posted August 30, 2010 thank you for your quick response!Now, i was able to have both email showing gift message. yay!However, I don't know if they chose gift wrapping box checked or not. If I charge for gift wrapping, I may know, but right now, I am planning NOT to charge them for gift wrapping.Anyway, my email can show if customer "checked" the check box for gift wrapping option?Thank you Link to comment Share on other sites More sharing options...
rocky Posted August 30, 2010 Share Posted August 30, 2010 In that case, use the following instead: '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), '{gift}' => $order->gift ? 'Yes' : 'No', '{gift_message}' => $order->gift_message, Then put the following in new_order.html and new_order.txt to display either "Gift: Yes" or "Gift: No": Gift: {gift} 1 Link to comment Share on other sites More sharing options...
cupK Posted August 30, 2010 Author Share Posted August 30, 2010 Thank you again!I works beautifully! I am just curious. Do I need to edit .txt files as well? or is this for organizing reason?Thank you!! Link to comment Share on other sites More sharing options...
rocky Posted August 30, 2010 Share Posted August 30, 2010 You should edit them both, since customers whose email client doesn't support HTML will get the text version, assuming you have Preferences > Email set to "Both". Link to comment Share on other sites More sharing options...
v_s Posted December 12, 2013 Share Posted December 12, 2013 I'm using wersion 1.4 and this solution didn't work in order_conf {gift_message}' => $order->gift_message)); in classes/PaymentModule.phpAny suggestion how make it work? Link to comment Share on other sites More sharing options...
gurdip Posted July 15, 2014 Share Posted July 15, 2014 Hi, I have an identical requirement - to add gift wrapping in the email notification. The steps do not work for PS 1.5.6.x. I'd be grateful if you can look at the code for this version to see how it can be implemented. Thank you. 1 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