Here is example with problem explanation:

  1. There is a product with base price $75 in Magento store
  2. This product has tax (included in price by dynamic tax) $10
  3. Where customer see product and adds it to the cart (and in checkout), product's price is $85 (base price + tax)
  4. There is Webshopapps Matrix rates (free) installed in Magento store
  5. Webshopapps Matrix rates configured to give free shipping for customer when product in cart costs $80 or more.
  6. When customer goes to checkout, he can't use free shipping, because real product price (without tax) is $75.

What i need to get:

When customer goes to checkout, he must get free shipping for this product. This means, that Shipping method cost (Matrix rates carrier) must be calculate not product base price, but product base price + tax, eg: product base price is $75 and tax is $10, in this way, shipping carrier must use price $85, not $75.

How can i do this?

1 Answer 1


I found the solution!

In Carrier model (Webshopapps_Matrixrate_Model_Carrier_Matrixrate) i changed $request->getPackageValue() to the sum of grand total prices. Watch out! In quote may be duplications. Here is solution code:

$grandTotal = 0;
$ids = array(); //$request->getAllItems() has duplicates, we need to remove them
foreach ($request->getAllItems() as $item){
    if(!isset($ids[$item->getQuote()->getEntityId()]) || empty($ids[$item->getQuote()->getEntityId()]))
        $ids[$item->getQuote()->getEntityId()] = true;
        $grandTotal = $grandTotal + $item->getQuote()->getGrandTotal();

if ($this->getConfigData('enable_free_shipping_threshold') && 
    $this->getConfigData('free_shipping_threshold')!='' && 
    $this->getConfigData('free_shipping_threshold')>0 &&
    $grandTotal>$this->getConfigData('free_shipping_threshold')) { //here i changed $request->getPackageValue() to $grandTotal
  • Is possible can i enter weight as KG in webshopapps metrix rate, because Default UPS, FEDEX, DHL required products weight as KG, but i am using Grams for webshopapps matrix rate. Is possible can i use products weight as KG in webshopapps metrix rate.
    – zus
    Commented Mar 22, 2018 at 6:39
  • Anyone knows how to give free shipping using Webshopapps Matrix Rates in SHopping Cart Pricing rule?
    – Gem
    Commented Sep 25, 2018 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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