From cbc5e76ed259ff3d7b10e2a7d01de11592ef1ceb Mon Sep 17 00:00:00 2001 From: RandeKnight Date: Tue, 13 Mar 2018 15:06:36 +0000 Subject: [PATCH 1/2] Fix product attribute ordering when more than 10 attributes. --- .../Magento/Swatches/view/frontend/web/js/swatch-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index a24c72c473fe9..2864d9eebe7b1 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -312,7 +312,7 @@ define([ */ _sortAttributes: function () { this.options.jsonConfig.attributes = _.sortBy(this.options.jsonConfig.attributes, function (attribute) { - return attribute.position; + return parseInt(attribute.position); }); }, From c1a9fab7f3ce103ea0b83fd0af94799c8b28938c Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Wed, 14 Mar 2018 16:33:14 +0200 Subject: [PATCH 2/2] magento/magento2#14083 --- .../Magento/Swatches/view/frontend/web/js/swatch-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js index 2864d9eebe7b1..a1effcb972204 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js @@ -312,7 +312,7 @@ define([ */ _sortAttributes: function () { this.options.jsonConfig.attributes = _.sortBy(this.options.jsonConfig.attributes, function (attribute) { - return parseInt(attribute.position); + return parseInt(attribute.position, 10); }); },