Skip to content

Commit

Permalink
20.4.4 SHQ23-433 Better handling of zero conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
wsajosh committed Aug 23, 2023
1 parent 0d877cc commit 03eea3c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-PUBLIC.MD
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ MNB-2539 Add support for Magento 2.4.4
MNB-2539 Add support for Magento 2.4.4


## 20.4.4 (2023-08-23)
SHQ23-433 Better handling of zero conditions


4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ MNB-2539 Add support for Magento 2.4.4
MNB-2539 Add support for Magento 2.4.4


## 20.4.4 (2023-08-23)
SHQ23-433 Better handling of zero conditions


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webshopapps/module-matrixrate",
"description": "Magento Shipping Multiple Table Rates - MatrixRate",
"version": "20.4.3",
"version": "20.4.4",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Model/ResourceModel/Carrier/Matrixrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ protected function _getImportRow($row, $rowNumber = 0)

// validate condition from value
// MNB-472 Thanks to https://github.com/JeroenVanLeusden for the enhancement to accept -1
$valueFrom = $row[5] == '*' || $row[5] == -1 ? -1 : $this->_parseDecimalValue($row[5]);
$valueFrom = $row[5] == '*' || $row[5] <= 0 ? -1 : $this->_parseDecimalValue($row[5]);
if ($valueFrom === false) {
$this->importErrors[] = __(
'Please correct %1 From "%2" in Row #%3.',
Expand All @@ -571,7 +571,7 @@ protected function _getImportRow($row, $rowNumber = 0)
);
return false;
}
// validate conditionto to value
// validate condition to value
$valueTo = $row[6] == '*' ? 10000000 : $this->_parseDecimalValue($row[6]);
if ($valueTo === false) {
$this->importErrors[] = __(
Expand Down
2 changes: 1 addition & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webshopapps/module-matrixrate",
"description": "Magento Shipping Multiple Table Rates - MatrixRate",
"version": "20.4.0",
"version": "20.4.4",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down

0 comments on commit 03eea3c

Please sign in to comment.