From 4c13ad766c85ea4514de90e0c9d0c035d5fc0172 Mon Sep 17 00:00:00 2001 From: Rostyslav Sabishchenko Date: Fri, 2 Nov 2018 13:35:20 +0200 Subject: [PATCH] #18348 - In admin, last swatch option set to default upon save --- .../Swatches/view/adminhtml/web/js/product-attributes.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js b/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js index 4c9df6ef657d7..3a40370fe8194 100644 --- a/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js +++ b/app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js @@ -439,6 +439,9 @@ define([ activePanel.find('table input') .each(function () { + if ($(this).is(':radio') && !$(this).prop("checked")) { + return; + } swatchValues.push(this.name + '=' + $(this).val()); });