Magento Matrix Rates Nett Order Value After Discount

created July 3, 2015, last updated July 3, 2015.

.
closeThis post was last updated 8 years 8 months 20 days ago, some of the information contained here may no longer be actual and any referenced software versions may have been updated!

If you are using Webshopapps free Matrix Rates module the default module code uses the order value before discount. Most likely you will want to offer Free Shipping for orders with a nett value calculated after any discounts.

To apply Matrix Rates shipping rates to the nett order value after discount modify /home/www/ecommerce/shop01/magento/app/code/community/Webshopapps/Matrixrate/Model/Carrier/Matrixrate.php

Look for

$ratearray = $this->getRate($request);

around line 115, and before this add

$request->setPackageValue($request->getPackageValueWithDiscount());

This will modify the value used to calculate the rate to the order value after (with) discount. Note if you have virtual products, move the request variable change higher up in the method, before the logic that detects virtual products.

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.