Skip to content

Commit 4f6b1f1

Browse files
author
Volodymyr Klymenko
authored
Merge pull request #698 from magento-tsg/2.0-develop-pr3
[TSG] Backporting for 2.0 (pr3)
2 parents d385dbb + 9cdfb68 commit 4f6b1f1

File tree

56 files changed

+1087
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1087
-298
lines changed

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,10 @@ define([
295295
case 'hidden':
296296
optionHash = 'bundle-option-' + optionName + '##' + optionValue;
297297
optionQty = optionConfig[optionValue].qty || 0;
298+
canQtyCustomize = optionConfig[optionValue].customQty === '1';
299+
qtyField = element.data('qtyField');
300+
qtyField.data('option', element);
301+
toggleQtyField(qtyField, optionQty, optionId, optionValue, canQtyCustomize);
298302
tempChanges = utils.deepClone(optionConfig[optionValue].prices);
299303
tempChanges = applyTierPrice(tempChanges, optionQty, optionConfig);
300304
tempChanges = applyQty(tempChanges, optionQty);

app/code/Magento/Catalog/Model/ProductRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
679679
$collection->setCurPage($searchCriteria->getCurrentPage());
680680
$collection->setPageSize($searchCriteria->getPageSize());
681681
$collection->load();
682+
$collection->addCategoryIds();
682683

683684
$searchResult = $this->searchResultsFactory->create();
684685
$searchResult->setSearchCriteria($searchCriteria);

app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ public function testGetList($fieldName)
632632
$searchCriteriaMock->expects($this->once())->method('getPageSize')->willReturn(42);
633633
$collectionMock->expects($this->once())->method('setPageSize')->with(42);
634634
$collectionMock->expects($this->once())->method('load');
635+
$collectionMock->expects($this->once())->method('addCategoryIds');
635636
$collectionMock->expects($this->once())->method('getItems')->willReturn([$itemsMock]);
636637
$collectionMock->expects($this->once())->method('getSize')->willReturn(128);
637638
$searchResultsMock = $this->getMock(

app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
define([
66
'jquery',
77
'underscore',
8-
'jquery/ui'
8+
'jquery/ui',
9+
'mage/translate'
910
], function ($, _) {
1011
'use strict';
1112

app/code/Magento/Catalog/view/frontend/web/js/view/compare-products.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44
*/
55
define([
66
'uiComponent',
7-
'Magento_Customer/js/customer-data'
7+
'Magento_Customer/js/customer-data',
8+
'mage/translate'
89
], function (Component, customerData) {
910
'use strict';
1011

1112
var sidebarInitialized = false;
1213

1314
function initSidebar() {
1415
if (sidebarInitialized) {
15-
return ;
16+
return;
1617
}
1718
sidebarInitialized = true;
1819
require([
1920
'jquery',
2021
'mage/mage'
2122
], function ($) {
23+
/*eslint-disable max-len*/
2224
$('[data-role=compare-products-sidebar]').mage('compareItems', {
23-
"removeConfirmMessage": $.mage.__(
24-
"Are you sure you want to remove this item from your Compare Products list?"
25-
),
26-
"removeSelector": "#compare-items a.action.delete",
27-
"clearAllConfirmMessage": $.mage.__(
28-
"Are you sure you want to remove all items from your Compare Products list?"
29-
),
30-
"clearAllSelector": "#compare-clear-all"
25+
'removeConfirmMessage': $.mage.__('Are you sure you want to remove this item from your Compare Products list?'),
26+
'removeSelector': '#compare-items a.action.delete',
27+
'clearAllConfirmMessage': $.mage.__('Are you sure you want to remove all items from your Compare Products list?'),
28+
'clearAllSelector': '#compare-clear-all'
3129
});
30+
31+
/*eslint-enable max-len*/
3232
});
3333
}
3434

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ define([
219219
var msg = response.error_message;
220220
if (msg) {
221221
alert({
222-
content: $.mage.__(msg)
222+
content: msg
223223
});
224224
}
225225
}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ define([
77
'Magento_Customer/js/customer-data',
88
'jquery',
99
'ko',
10-
'sidebar'
10+
'sidebar',
11+
'mage/translate'
1112
], function (Component, customerData, $, ko) {
1213
'use strict';
1314

@@ -67,9 +68,7 @@ define([
6768
'qty': ':input.cart-item-qty',
6869
'button': ':button.update-cart-item'
6970
},
70-
'confirmMessage': $.mage.__(
71-
'Are you sure you would like to remove this item from the shopping cart?'
72-
)
71+
'confirmMessage': $.mage.__('Are you sure you would like to remove this item from the shopping cart?')
7372
});
7473
}
7574

app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ require([
2929
'jquery',
3030
'mage/template',
3131
'jquery/file-uploader',
32-
'domReady!'
32+
'domReady!',
33+
'mage/translate'
3334
], function ($, mageTemplate) {
3435
$('#<?php echo $block->getHtmlId() ?> .fileupload').fileupload({
3536
dataType: 'json',

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/product-grid.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ define([
88
'jquery',
99
'Magento_Ui/js/core/app',
1010
'underscore',
11-
'notification'
11+
'notification',
12+
'mage/translate'
1213
], function (Component, $, bootstrap, _) {
1314
'use strict';
1415

@@ -221,9 +222,7 @@ define([
221222

222223
if (data.items.length) {
223224
this.productsModal.notification('add', {
224-
message: $.mage.__(
225-
'Choose a new product to delete and replace the current product configuration.'
226-
),
225+
message: $.mage.__('Choose a new product to delete and replace the current product configuration.'),
227226
messageContainer: this.gridSelector
228227
});
229228
} else {

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps/select_attributes.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ define([
5151
this.setNotificationMessage();
5252
},
5353
setNotificationMessage: function () {
54+
/*eslint-disable max-len*/
55+
var msg = $.mage.__('When you remove or add an attribute, we automatically update all configurations and you will need to recreate current configurations manually.');
56+
57+
/*eslint-enable max-len*/
58+
5459
if (this.mode === 'edit') {
55-
this.wizard.setNotificationMessage($.mage.__('When you remove or add an attribute, we automatically ' +
56-
'update all configurations and you will need to manually recreate the current configurations.'));
60+
this.wizard.setNotificationMessage(msg);
5761
}
5862
},
5963
doSelectSavedAttributes: function () {

0 commit comments

Comments
 (0)