Jump to content
weekscigar

List Shipping Cost Without Tax in New Order Email from MailAlerts

Recommended Posts

Hello,

 

I would like to modify the New Order email generated by MailAlerts module to include the Shipping line item WITHOUT any tax charged for shipping.

 

I have one state that charges for shipping. I've already included a new line item in the email for tax amount (that I'm calculating the amount of using the $order varaibles in PaymentModule.php).

 

Part of that calculation that I'm doing invovles the $order->total_shipping variable.

 

So, I guess my question is, is there something like $order->total_shipping_without_tax available in that $order array?

 

Any help is appreciated.

Share this post


Link to post
Share on other sites

in your payment.Module.php, line 246 or around that, there's:

 

$order->total_shipping_tax_excl = (float)$this->context->cart->getPackageShippingCost((int)$id_carrier, false, null, $order->product_list);

 

then in the data array, add:

 

'{total_shipping}' => Tools::displayPrice($order->total_shipping_tax_excl, $this->context->currency, false),

 

How did you isolate only the carrier tax?!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More