Skip to content

Commit

Permalink
12468: Sort by Price not working on CatalogSearch Page in Magento 2
Browse files Browse the repository at this point in the history
  • Loading branch information
omiroshnichenko committed Dec 11, 2017
1 parent c0b6034 commit 34b6438
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public function getWidgetOptionsJson(array $customOptions = [])
'limit' => ToolbarModel::LIMIT_PARAM_NAME,
'modeDefault' => $defaultMode,
'directionDefault' => $this->_direction ?: ProductList::DEFAULT_SORT_DIRECTION,
'orderDefault' => $this->_productListHelper->getDefaultSortField(),
'orderDefault' => $this->getOrderField(),
'limitDefault' => $this->_productListHelper->getDefaultLimitPerPageValue($defaultMode),
'url' => $this->getPagerUrl(),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ define([
);
},

/*eslint-disable no-unused-vars*/
/**
* @param {String} paramName
* @param {*} paramValue
Expand All @@ -100,13 +99,14 @@ define([
}
paramData[paramName] = paramValue;

if (paramValue == defaultValue) { //eslint-disable-line eqeqeq
delete paramData[paramName];
}
paramData = $.param(paramData);

location.href = baseUrl + (paramData.length ? '?' + paramData : '');
}
});

/*eslint-enable no-unused-vars*/

return $.mage.productListToolbarForm;
});

0 comments on commit 34b6438

Please sign in to comment.