Jump to content

Total price with discount included


Recommended Posts

I would like to display the total price with voucher discount included in the shopping cart
after the customer adds the discount voucher. Right now, I'm just getting the
amount of discount, but nut the new price after reduction.

I tryied with $total_price and $total_discounts, but they are not the right codes,
can anybody how to get it displayed?

Thanks

Link to comment
Share on other sites

Am I the only one who ever asked about this??
I mean, this value is naturally included on the invoice but not in the FO order detail/shopping cart.

What I need is the total price after voucher discount WITHOUT the shipping cost.

Please guys, give me a hand on how to solve this, so I can start giving vouchers.

Link to comment
Share on other sites

It appears there is no variable that includes the product total with discounts, but without shipping. You'll need to add it by changing line 465 of order.php (in PrestaShop v1.3.1) from:

'shippingCostTaxExc' => $cart->getOrderTotal(false, 5),



to:

'shippingCostTaxExc' => $cart->getOrderTotal(false, 5),
'totalWithDiscounts' => $cart->getOrderTotal(true, 4),



Then you can use the following in shopping-cart.tpl to display the total with discounts, but without shipping:

{$totalWithDiscounts}

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...