2

I want to add freeshipping on subtotal but after discount i already have tried with

if ($request->getFreeShipping() 
|| $request->getPackageValueWithDiscount() >= $this->getConfigData('free_shipping_subtotal')) {
    ...
}

But this only takes subtotal not and discount did anyone know how can I get subtotal after discount.

Thanks

0

As long as your collectTotals order is to calculate discount first then using $request->getPackageValueWithDiscount() will be the discounted total.

See Mage_Sales_Model_Quote_Address:

 $packageValueWithDiscount = $item
        ? $item->getBaseRowTotal() - $item->getBaseDiscountAmount()
        : $this->getBaseSubtotalWithDiscount();
    $request->setPackageValueWithDiscount($packageValueWithDiscount);

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.