How to replace the item's ID with their prices and show the total price in the mail?


Let's start with the first part, replacing the item's IDs with their prices?

1. Open the 'js/products/products.js' file and search for the 'prodList.push' call.

2. Add a new property called 'price' like shown in the screenshot.

3. Open your 'sendmail.php' file and search for the '$product->code' statement.

4. Replace it with '$product->price' and add your currency afterwards, like shown in the screenshot.

5. Open your 'mail/mail.html' file and change the 'Item ID' heading to the 'Item Price' heading, like shown in the screenshot.

 

We are done with the first part and ready to get to the second one.

1. In the 'sendmail.php' file, define a '$total' variable, get a sum of all the prices and send it to the mail template, like shown in the screenshot.

2. Open your 'mail/mail.html' file, add a new raw called 'Total' and set the correct currency, like shown in the screenshot.

 

Tags: id, mail, price, product, total

Last update:
2015-12-07 19:25
Author:
Vlad Sargu
Revision:
1.0
Average rating:0 (0 Votes)