betyonfire Posted April 2, 2013 Share Posted April 2, 2013 I've tried following instructions in the forum about adding a line showing tax to the email template order_conf.html but have not had success with PS 1.5.2 I need to display the Product Price without tax and the to display the tax separately. Here's what I have in PaymentModule.php: $total_products_notax = $order->total_products; $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; and '{total_products_notax}' => Tools::displayPrice($total_products_notax), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false, false)); Here's what I'm getting: Help? Link to comment Share on other sites More sharing options...
sscardefield Posted April 4, 2013 Share Posted April 4, 2013 I am on the hunt for this fix as well. If you come up with a resolution please post it here. I am going to play with it some more later tonight. If I come up with something I'll definitely let you know. Link to comment Share on other sites More sharing options...
OliB Posted April 5, 2013 Share Posted April 5, 2013 (edited) Maybe a false on the false place? Try '{total_tax}' => Tools::displayPrice($total_tax, $currency, false), '{total_paid_notax}' => Tools::displayPrice($total_paid_notax, $currency, false)); Edited April 5, 2013 by OliB (see edit history) Link to comment Share on other sites More sharing options...
betyonfire Posted April 8, 2013 Author Share Posted April 8, 2013 That didn't work, but thanks for the suggestion. Did you have any luck Sscardefield? Link to comment Share on other sites More sharing options...
sscardefield Posted April 9, 2013 Share Posted April 9, 2013 Sorry, I haven't had a chance to mess with it yet. I'll see if I can find some time tonight. Link to comment Share on other sites More sharing options...
sscardefield Posted April 10, 2013 Share Posted April 10, 2013 I just spent the better part of an hour on it and can't figure it out. Had to take a break. I really want need the tax shown in the confirmation email, so I'll work on it a bit more tonight, but if I can't figure it out I'll probably just end up putting it in the paid services forum. Link to comment Share on other sites More sharing options...
betyonfire Posted April 10, 2013 Author Share Posted April 10, 2013 I got this working. I was being dumb and had forgotten that I had previously made some edits to PaymentModule.php and the working copy was actually in the override/classes/ directory. I added this at line 440 $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; And then in the array, edited to total_products line and added total_tax '{total_products}' => Tools::displayPrice($order->total_paid - $total_tax - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $this->context->currency, false), '{total_tax}' => Tools::displayPrice($total_tax, $currency, false), Then made the corresponding changes in order_conf.html and order_conf.txt 1 Link to comment Share on other sites More sharing options...
sscardefield Posted April 11, 2013 Share Posted April 11, 2013 Is your line 440 in PaymentModule.php right in the middle of the voucher settings? This is mine, doesn't seem like the right place to put it. Link to comment Share on other sites More sharing options...
betyonfire Posted April 11, 2013 Author Share Posted April 11, 2013 No, that's not the place. Here's are the lines from my PaymentModule.php file, including the two new ones at the bottom: // Send an e-mail to customer (one order = one email) if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && $this->context->customer->id) { $invoice = new Address($order->id_address_invoice); $delivery = new Address($order->id_address_delivery); $delivery_state = $delivery->id_state ? new State($delivery->id_state) : false; $invoice_state = $invoice->id_state ? new State($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; 1 Link to comment Share on other sites More sharing options...
sscardefield Posted April 11, 2013 Share Posted April 11, 2013 Worked perfect. Thanks! Link to comment Share on other sites More sharing options...
betyonfire Posted April 11, 2013 Author Share Posted April 11, 2013 Excellent! So glad I could actually help you. Wish there were more people helping out around here . . . Link to comment Share on other sites More sharing options...
jmfelip Posted April 14, 2014 Share Posted April 14, 2014 Hi, I've got the same problem, but I tried to copy this piece of code and nothing happens. What is the problem? Best, JOsep M FElip Link to comment Share on other sites More sharing options...
Pete78 Posted September 9, 2014 Share Posted September 9, 2014 Hi, because I had the same issue : Please check, if any payment module you use overrides "validateOrder". Maybe you have to enter the code there as well... Link to comment Share on other sites More sharing options...
Recommended Posts