Skip to content

Commit 5a47b77

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1682 from magento-engcom/2.2-develop-prs
Public Pull Requests #11958 11197: Blank page at the checkout 'shipping' step[backport]. by @nmalevanec #11588 Fix Issue #7225 - Remove hardcoding of apply_to when saving attributes by @MartinPeverelli Fixed Public Issues #11197 Blank page at the checkout 'shipping' step #7225 [BUG] [Magento 2.1.2] Programmatically creating an empty dropdown attribute, "apply_to" is set to NULL (from "simple") after adding options through store admin
2 parents 838cff7 + 98d2117 commit 5a47b77

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function execute()
193193
);
194194
}
195195

196-
$data += ['is_filterable' => 0, 'is_filterable_in_search' => 0, 'apply_to' => []];
196+
$data += ['is_filterable' => 0, 'is_filterable_in_search' => 0];
197197

198198
if (is_null($model->getIsUserDefined()) || $model->getIsUserDefined() != 0) {
199199
$data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']);

app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define([
4747

4848
steps.sort(this.sortItems).forEach(function (element) {
4949
if (element.code == hashString || element.alias == hashString) { //eslint-disable-line eqeqeq
50-
element.navigate();
50+
element.navigate(element);
5151
} else {
5252
element.isVisible(false);
5353
}

app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ define([
127127
},
128128

129129
/**
130-
* Load data from server for shipping step
130+
* Navigator change hash handler.
131+
*
132+
* @param {Object} step - navigation step
131133
*/
132-
navigate: function () {
133-
//load data from server for shipping step
134+
navigate: function (step) {
135+
step && step.isVisible(true);
134136
},
135137

136138
/**

dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/view/shipping.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ define(['squire', 'ko', 'jquery', 'jquery/validate'], function (Squire, ko, $) {
8080
describe('Magento_Checkout/js/view/shipping', function () {
8181
describe('"navigate" method', function () {
8282
it('Check for return value.', function () {
83-
expect(obj.navigate()).toBeUndefined();
83+
var step = {
84+
isVisible: ko.observable(false)
85+
};
86+
87+
expect(obj.navigate(step)).toBeUndefined();
88+
expect(step.isVisible()).toBe(true);
8489
});
8590
});
8691

0 commit comments

Comments
 (0)