WZ810 Posted October 9, 2010 Share Posted October 9, 2010 How do I make a swift email code so I can include tax in the order confirmation email? Which file do I need to edit and what code do I need to add to it so it will call the tax amount? I need to know how to make it work in the email template like this: html e.g. {total_tax} I assume {total_tax} will also work in .txt version if it works in html?Thanks in advance.P.S. off-topic question, kinda: Will commenting out like {*blah blah blah*} work in .txt emails because I would like to comment out the gift-wrapping section? Otherwise, I will just delete it. 1 Link to comment Share on other sites More sharing options...
rocky Posted October 9, 2010 Share Posted October 9, 2010 This topic might help.No, you can't comment out in email templates or use any Smarty tags. Link to comment Share on other sites More sharing options...
WZ810 Posted October 9, 2010 Author Share Posted October 9, 2010 In that link you gave me he made some variables which I assume go between line 317 and line 324. $total_products_notax = $order->total_products; $total_products = $order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts; $total_paid_notax = $total_products_notax + $order->total_shipping + $order->total_wrapping - $order->total_discounts; $total_paid = $total_paid_notax * 1.19; $total_tax = $total_paid - $total_paid_notax; Then I make a PHP variable in classes/PaymentModule.php under $data = array (line 324) '{total_tax}' => Tools::displayPrice($total_tax, $currency, false, false), Then I add {total_tax} to the .txt and html email templates.However, how do I make the 1.19 tax rate dynamic? I am also assuming the 1.19 means 1.19%? Link to comment Share on other sites More sharing options...
rocky Posted October 10, 2010 Share Posted October 10, 2010 No, 1.19 means 19% tax is added on top of the total excluding tax. Try changing: $total_paid = $total_paid_notax * 1.19; $total_tax = $total_paid - $total_paid_notax; to: $total_tax = $order->total_paid - $total_paid_notax; Link to comment Share on other sites More sharing options...
WZ810 Posted October 10, 2010 Author Share Posted October 10, 2010 I just realized the Subtotal is adding tax, which I do not want. And tax is also adding shipping.Here is an example of what I want in the email: Subtotal - $63.00Tax - $5.70Discounts - $0.00Shipping - $10.75Total - $79.45Instead, I am getting:Subtotal - $68.70Tax - $16.45Discounts - $0.00Shipping - $10.75Total - $79.45Subtotal is just the price of the products added together (no discounts or anything else).Tax is 9.025%.Discounts is correct at $0.00.Shipping is correct at $10.75.And the total is correct at $79.45 (which is what the customer will end up paying when all is said and done).Here is my code so far for PaymentModule.php: // Send an e-mail to customer if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_ AND $customer->id) { $invoice = new Address(intval($order->id_address_invoice)); $delivery = new Address(intval($order->id_address_delivery)); $carrier = new Carrier(intval($order->id_carrier)); $delivery_state = $delivery->id_state ? new State(intval($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State(intval($invoice->id_state)) : false; $total_paid_notax = $order->total_products; + $order->total_shipping + $order->total_wrapping - $order->total_discounts; $total_tax = $order->total_paid - $total_paid_notax; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => $delivery->phone, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => $invoice->phone, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#d", intval($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), intval($order->id_lang), 1), '{carrier}' => (strval($carrier->name) != '0' ? $carrier->name : Configuration::get('PS_SHOP_NAME')), '{payment}' => $order->payment, '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false, false), '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false, false)); Link to comment Share on other sites More sharing options...
WZ810 Posted October 11, 2010 Author Share Posted October 11, 2010 Solved it. Thanks for pointing me in the right direction.Finished code: // Send an e-mail to customer if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_ AND $customer->id) { $invoice = new Address(intval($order->id_address_invoice)); $delivery = new Address(intval($order->id_address_delivery)); $carrier = new Carrier(intval($order->id_carrier)); $delivery_state = $delivery->id_state ? new State(intval($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State(intval($invoice->id_state)) : false; $total_paid_notax = $order->total_products; + $order->total_shipping + $order->total_wrapping - $order->total_discounts; $total_tax = $order->total_paid - $total_paid_notax - $order->total_shipping; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => $delivery->phone, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => $invoice->phone, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#d", intval($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), intval($order->id_lang), 1), '{carrier}' => (strval($carrier->name) != '0' ? $carrier->name : Configuration::get('PS_SHOP_NAME')), '{payment}' => $order->payment, '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false, false), '{total_products}' => Tools::displayPrice($order->total_paid - $total_tax - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false, false), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false, false)); 1 Link to comment Share on other sites More sharing options...
anderton Posted March 27, 2011 Share Posted March 27, 2011 Just for helping out to some users, it also works in PS 3.7, no idea with the last release....seems to be quite different for tuning sites....All the best Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 10, 2011 Share Posted October 10, 2011 What about for version 1.4.4.1, this paymentmodule.php is so different. I want to just show the product total without tax, not with it, the subtotal without tax on one line and total tax on a seperate line and a third line with the total plus tax, plus shipping and minus discounts. Just on the order confirmation. It already shows correctly in the order Basically just seperate out the tax and have it show on one line. It would be like this Reference Product Unit Price Quantity Total price without tax 12345 Blue Teeshirt $1.50 2 $3.00 Total products without tax: $3.00 Total Tax (7%) $00.21 Subtotal: (products + tax) $3.21 Total Discounts: $0.00 Total Gift-wrapping: $0.00 Total Shipping: $1.00 Final Total: $4.21 How is this done? Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted October 10, 2011 Share Posted October 10, 2011 since I am using the new version 1.4.4.1 on my sites now, and the cart shows the total without tax on a seperate line. I should just be able to edit only the order_conf.html file and get it to show the tax and subtotal without tax on seperate lines in the invoice instead of just the product totals with tax included. I have my preferences set to exclude tax on product price. My modules>mail alerts>order_conf.html file code (version 1.4.4.1) was edited with an attempt to do this you will find below.. is this correct? Can you tell me Rocky? <td align="left"> <a href="{shop_url}" title="{shop_name}"><img alt="{shop_name}" src="{shop_logo}" style="border:none;" ></a> </td> </tr> <tr><td> </td></tr> <tr> <td align="left">Hello <strong style="color:#FF0000;">{firstname} {lastname}</strong>, thank you for shopping with <strong>{shop_name}</strong>.</td> </tr> <tr><td> </td></tr> <tr> <td align="left" style="background-color:#FF0000; color:#FFF; font-size: 12px; font-weight:bold; padding: 0.5em 1em;">Order details</td> </tr> <tr><td> </td></tr> <tr> <td align="left"> Order: <strong><span style="color:#FF0000;">{order_name}</span> placed on {date}</strong> <br >Payment: <strong>{payment}</strong> </td> </tr> <tr><td> </td></tr> <tr> <td align="left"> <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#374953;"> <!-- Title --> <tr style="background-color:#B9BABE; text-align:center;"> <th style="width:15%; padding: 0.6em 0;">Reference</th> <th style="width:35%; padding: 0.6em 0;">Product</th> <th style="width:15%; padding: 0.6em 0;">Unit price</th> <th style="width:15%; padding: 0.6em 0;">Quantity</th> <th style="width:20%; padding: 0.6em 0;">Total price</th> </tr> <!-- Products --> {products} {total_discounts} <!-- Footer: prices --> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#B9BABE; padding:0.6em 0.4em;">Total Products Without Tax</td> <td style="background-color:#B9BABE; padding:0.6em 0.4em;">{total_price_without_tax}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#B9BABE; padding:0.6em 0.4em;">Total Tax</td> <td style="background-color:#B9BABE; padding:0.6em 0.4em;">{total_tax}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#B9BABE; padding:0.6em 0.4em;">Total Products with Tax </td> <td style="background-color:#B9BABE; padding:0.6em 0.4em;">{total_products}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#EBECEE; padding:0.6em 0.4em;">Total Discounts</td> <td style="background-color:#EBECEE; padding:0.6em 0.4em;">{total_discounts}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#EBECEE; padding:0.6em 0.4em;">Total Gift-wrapping</td> <td style="background-color:#EBECEE; padding:0.6em 0.4em;">{total_wrapping}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#DDE2E6; padding:0.6em 0.4em;">Total Shipping</td> <td style="background-color:#DDE2E6; padding:0.6em 0.4em;">{total_shipping}</td> </tr> <tr style="text-align:right; font-weight:bold;"> <td> </td> <td colspan="3" style="background-color:#6699FF; padding:0.6em 0.4em;">Final Total Paid</td> <td style="background-color:#6699FF; padding:0.6em 0.4em;">{total_paid}</td> </tr> </table> </td> </tr> <tr><td> </td></tr> <tr> <td align="left" style="background-color:#FF0000; color:#FFF; font-size: 12px; font-weight:bold; padding: 0.5em 1em;">Shipping</td> </tr> <tr><td> </td></tr> <tr> <td align="left"> Carrier: <strong>{carrier}</strong> </td> </tr> <tr><td> </td></tr> <tr> <td> <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#374953;"> <tr style="background-color:#B9BABE; text-transform:uppercase;"> <th style="text-align:left; padding: 0.3em 1em;">Delivery address</th> <th style="text-align:left; padding: 0.3em 1em;">Billing address</th> </tr> <tr> <td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;"> {delivery_company} <br><span style="color:#FF0000; font-weight:bold;">{delivery_firstname} {delivery_lastname}</span> <br>{delivery_address1} <br>{delivery_address2} <br>{delivery_city}, {delivery_state} {delivery_postal_code} <br>{delivery_country} <br>{delivery_phone} <br>{delivery_other} </td> <td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;"> {invoice_company} <br><span style="color:#FF0000; font-weight:bold;">{invoice_firstname} {invoice_lastname}</span> <br>{invoice_address1} <br>{invoice_address2} <br>{invoice_city}, {invoice_state} {invoice_postal_code} <br>{invoice_country} <br>{invoice_phone} <br>{invoice_other} </td> </tr> </table> </td> </tr> <tr><td> </td></tr> <tr> <td align="left"> You can review this order and download your invoice from the <a href="{shop_url}history.php" style="color:#FF0000; font-weight:bold; text-decoration:none;">"Order history"</a> section of your account by clicking <a href="{shop_url}my-account.php" style="color:#FF0000; font-weight:bold; text-decoration:none;">"My account"</a> on our Website. </td> Link to comment Share on other sites More sharing options...
arjundass Posted March 5, 2012 Share Posted March 5, 2012 The code works perfect, how could i save the total_tax value to Database. I have added total_tax in order,s table and modified some code. but not getting it to work.. Any help would be appreciated.. Link to comment Share on other sites More sharing options...
Never_give_up Posted April 13, 2012 Share Posted April 13, 2012 How to add separate tax row in customer confirmation email using Prestashop 1.4.7.0 in classes/PaymentModule.php find and change to the following: // Send an e-mail to customer if ($id_order_state != Configuration::get('PS_OS_ERROR') AND $id_order_state != Configuration::get('PS_OS_CANCELED') AND $customer->id) { $invoice = new Address((int)($order->id_address_invoice)); $delivery = new Address((int)($order->id_address_delivery)); $carrier = new Carrier((int)($order->id_carrier), $order->id_lang); $delivery_state = $delivery->id_state ? new State((int)($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State((int)($invoice->id_state)) : false; $total_paid_notax = $order->total_products; + $order->total_shipping + $order->total_wrapping - $order->total_discounts; $total_tax = $order->total_paid - $total_paid_notax - $order->total_shipping; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => $this->_getFormatedAddress($delivery, "<br />", array( 'firstname' => '<span style="color:#544630; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#544630; font-weight:bold;">%s</span>')), '{invoice_block_html}' => $this->_getFormatedAddress($invoice, "<br />", array( 'firstname' => '<span style="color:#544630; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#544630; font-weight:bold;">%s</span>')), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_vat_number}' => $invoice->vat_number, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#%06d", (int)($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)($order->id_lang), 1), '{carrier}' => $carrier->name, '{payment}' => Tools::substr($order->payment, 0, 32), '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false), '{total_products}' => Tools::displayPrice($order->total_paid - $total_tax - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false)); in /mails/en/order_conf.html find and change to the following: <tr><td> </td></tr> <tr> <td align="left"> <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#544938;"> <!-- Title --> <tr style="background-color:#bbbbbb; text-align:center;"> <th style="width:15%; padding: 0.6em 0;">Reference</th> <th style="width:35%; padding: 0.6em 0;">Product</th> <th style="width:15%; padding: 0.6em 0;">Unit price</th> <th style="width:15%; padding: 0.6em 0;">Quantity</th> <th style="width:20%; padding: 0.6em 0;">Total price</th> </tr> <!-- Products --> {products} {discounts} <!-- Footer: prices --> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#bbbbbb; padding:0.6em 0.4em;">Total Products</td> <td style="background-color:#bbbbbb; padding:0.6em 0.4em;">{total_products}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Discounts</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_discounts}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Gift Wrapping</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_wrapping}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Tax</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_tax}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#e1e1e1; padding:0.6em 0.4em;">Shipping</td> <td style="background-color:#e1e1e1; padding:0.6em 0.4em;">{total_shipping}</td> </tr> <tr style="text-align:right; font-weight:bold;"> <td> </td> <td colspan="3" style="background-color:#bdbdbd; padding:0.6em 0.4em;">Total paid</td> <td style="background-color:#bdbdbd; padding:0.6em 0.4em;">{total_paid}</td> </tr> </table> </td> </tr> <tr><td> </td></tr> Hope this helps 3 Link to comment Share on other sites More sharing options...
AKJV Posted May 14, 2012 Share Posted May 14, 2012 I'm also trying to get lines with "total without tax" and "total tax" in my order confirmation mail in PS 1.4.7.3 But I see 2 issues with the last proposed code change in PaymentModule.php. First, there's a semicolon that shouldn't be there in this added line: $total_paid_notax = $order->total_products; + $order->total_shipping + $order->total_wrapping - $order->total_discounts; This should be like this: $total_paid_notax = $order->total_products + $order->total_shipping + $order->total_wrapping - $order->total_discounts; Second, this calculation isn't done correctly since the total_shipping part of this line still includes tax. Might be true for wrapping en discounts as well but haven't checked. Link to comment Share on other sites More sharing options...
ltempest Posted July 17, 2012 Share Posted July 17, 2012 Has anyone found a working solution to this issue. This seems to be a fundamental requirement of the software, why would you not want to include tax in the order confirmation email? Can anyone confirm whether the above code changes work? Thanks Lee Link to comment Share on other sites More sharing options...
Arkadia Posted November 12, 2012 Share Posted November 12, 2012 (edited) How to add separate tax row in customer confirmation email using Prestashop 1.4.7.0 in classes/PaymentModule.php find and change to the following: // Send an e-mail to customer if ($id_order_state != Configuration::get('PS_OS_ERROR') AND $id_order_state != Configuration::get('PS_OS_CANCELED') AND $customer->id) { $invoice = new Address((int)($order->id_address_invoice)); $delivery = new Address((int)($order->id_address_delivery)); $carrier = new Carrier((int)($order->id_carrier), $order->id_lang); $delivery_state = $delivery->id_state ? new State((int)($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State((int)($invoice->id_state)) : false; $total_paid_notax = $order->total_products; + $order->total_shipping + $order->total_wrapping - $order->total_discounts; $total_tax = $order->total_paid - $total_paid_notax - $order->total_shipping; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => $this->_getFormatedAddress($delivery, "<br />", array( 'firstname' => '<span style="color:#544630; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#544630; font-weight:bold;">%s</span>')), '{invoice_block_html}' => $this->_getFormatedAddress($invoice, "<br />", array( 'firstname' => '<span style="color:#544630; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#544630; font-weight:bold;">%s</span>')), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_vat_number}' => $invoice->vat_number, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#%06d", (int)($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)($order->id_lang), 1), '{carrier}' => $carrier->name, '{payment}' => Tools::substr($order->payment, 0, 32), '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false), '{total_products}' => Tools::displayPrice($order->total_paid - $total_tax - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false)); in /mails/en/order_conf.html find and change to the following: <tr><td> </td></tr> <tr> <td align="left"> <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#544938;"> <!-- Title --> <tr style="background-color:#bbbbbb; text-align:center;"> <th style="width:15%; padding: 0.6em 0;">Reference</th> <th style="width:35%; padding: 0.6em 0;">Product</th> <th style="width:15%; padding: 0.6em 0;">Unit price</th> <th style="width:15%; padding: 0.6em 0;">Quantity</th> <th style="width:20%; padding: 0.6em 0;">Total price</th> </tr> <!-- Products --> {products} {discounts} <!-- Footer: prices --> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#bbbbbb; padding:0.6em 0.4em;">Total Products</td> <td style="background-color:#bbbbbb; padding:0.6em 0.4em;">{total_products}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Discounts</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_discounts}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Gift Wrapping</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_wrapping}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#ececec; padding:0.6em 0.4em;">Tax</td> <td style="background-color:#ececec; padding:0.6em 0.4em;">{total_tax}</td> </tr> <tr style="text-align:right;"> <td> </td> <td colspan="3" style="background-color:#e1e1e1; padding:0.6em 0.4em;">Shipping</td> <td style="background-color:#e1e1e1; padding:0.6em 0.4em;">{total_shipping}</td> </tr> <tr style="text-align:right; font-weight:bold;"> <td> </td> <td colspan="3" style="background-color:#bdbdbd; padding:0.6em 0.4em;">Total paid</td> <td style="background-color:#bdbdbd; padding:0.6em 0.4em;">{total_paid}</td> </tr> </table> </td> </tr> <tr><td> </td></tr> Hope this helps Thank you so much for your fix! It worked wonderfully in 1.4.5.1 It works fine in 1.5.2 as well Would be nice if prestashop includes this in future releases! It makes total sense to show the tax amount on the email. Thank you again!! Edited March 7, 2013 by Arkadia (see edit history) Link to comment Share on other sites More sharing options...
MisterM7543 Posted June 13, 2013 Share Posted June 13, 2013 (edited) Hello I raise the topics in the sense that I want to activate for PrestaShop 1.5.4.1, how? Because I seek in the French forum is English view is I do not think for version 1.5 see. thank you good day Mz PS : I'm talking about, display the price excluding tax bill that the client receives by email Edited June 13, 2013 by MisterM7543 (see edit history) 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