File tree 2 files changed +4
-4
lines changed
Block/Product/ProductList
view/frontend/web/js/product/list 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ public function getWidgetOptionsJson(array $customOptions = [])
689
689
'limit ' => ToolbarModel::LIMIT_PARAM_NAME ,
690
690
'modeDefault ' => $ defaultMode ,
691
691
'directionDefault ' => $ this ->_direction ?: ProductList::DEFAULT_SORT_DIRECTION ,
692
- 'orderDefault ' => $ this ->_productListHelper -> getDefaultSortField (),
692
+ 'orderDefault ' => $ this ->getOrderField (),
693
693
'limitDefault ' => $ this ->_productListHelper ->getDefaultLimitPerPageValue ($ defaultMode ),
694
694
'url ' => $ this ->getPagerUrl (),
695
695
];
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ define([
78
78
) ;
79
79
} ,
80
80
81
- /*eslint-disable no-unused-vars*/
82
81
/**
83
82
* @param {String } paramName
84
83
* @param {* } paramValue
@@ -100,13 +99,14 @@ define([
100
99
}
101
100
paramData [ paramName ] = paramValue ;
102
101
102
+ if ( paramValue == defaultValue ) { //eslint-disable-line eqeqeq
103
+ delete paramData [ paramName ] ;
104
+ }
103
105
paramData = $ . param ( paramData ) ;
104
106
105
107
location . href = baseUrl + ( paramData . length ? '?' + paramData : '' ) ;
106
108
}
107
109
} ) ;
108
110
109
- /*eslint-enable no-unused-vars*/
110
-
111
111
return $ . mage . productListToolbarForm ;
112
112
} ) ;
You can’t perform that action at this time.
0 commit comments