I use an extension to calculate shipping costs based on distance. There is a free shipping function which is applied when getBaseSubtotalInclTax() is higher than X. I need the total for all products minus discounts. How do I get it?


$quote->getBaseSubTotal() and $quote->getBaseSubTotalInclTax() already give you the subtotal (i.e. total of all products) without discounts.

If you need the grand total (with shipping and other additional costs), except discounts, you can try to subtract it:

$quote->getBaseGrandTotal() - $quote->getTotals()['discount']->getValue()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.