Jump to content

Gift Wrapping Option and message


Recommended Posts

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 wrapping
2. 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

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

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

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

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

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}

  • Like 1
Link to comment
Share on other sites

  • 3 years later...
  • 7 months later...

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...