webshopapps / module-matrixrate

WebShopApps MatrixRates for Magento2
Open Software License 3.0
120 stars 64 forks source link

Updates logic to get shipping rates #129

Open WillC0des opened 6 months ago

WillC0des commented 6 months ago

Fix for bug where the getFreeMethodWeight() function is dependent on a value other than null is being returned to build the shipping rate array.

Use Case:

On Magento stores, applying a coupon that has a fixed discount for both the subtotal and shipping cost will throw an error for shipping total when the ratesArray is empty. This is inevitable when getFreeMethodWeight() returns null.

Screenshot 2024-05-14 at 3 41 56 PM

wsajosh commented 4 months ago

This should already be caught in the check that is in: Model/ResourceModel/Carrier/Matrixrate.php around line 301

The check is: if ($condition == null || $condition == "") { $condition = 0; } Are you running the latest version of the extension?