Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
1268692
Fixed use config option for 'Enable Qty Increments' filed in product …
simpleadm Mar 24, 2018
b5aac65
Correct function return statement.
sanganinamrata Mar 30, 2018
2234540
Correct function return statement.
sanganinamrata Mar 30, 2018
16b8b2c
Using constants for qty increments in product import
simpleadm May 1, 2018
cb83575
Merge branch '2.3-develop' into fix-product-import-enable-qty-inc
simpleadm May 4, 2018
0365aa7
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 11, 2018
4bc6058
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 14, 2018
fa83bf8
Merge branch '2.3-develop' of github.com:magento/magento2ce into MAGE…
rganin May 15, 2018
1d6badb
MAGETWO-91446: Invalid usage of str_replace to truncate prefix from t…
rganin May 15, 2018
356a79b
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 15, 2018
0da1d42
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 16, 2018
54df350
MAGETWO-91446: Invalid usage of str_replace to truncate prefix from t…
rganin May 16, 2018
f0a0074
MAGETWO-91446: Invalid usage of str_replace to truncate prefix from t…
rganin May 16, 2018
980c6ef
Merge remote-tracking branch 'magento-earl-grey/MAGETWO-91446' into M…
fascinosum May 16, 2018
c1c409b
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-88814
fascinosum May 16, 2018
32616e0
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 17, 2018
78c2eba
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-88814
fascinosum May 17, 2018
7e0eff5
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 17, 2018
e120b37
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 17, 2018
b53e6b9
Fixed typo mistake in function comment
sanganinamrata May 18, 2018
f8f0f37
Removed extra added space in function comment and fixed typo mistakes.
sanganinamrata May 18, 2018
c964565
Revert back file changes
sanganinamrata May 18, 2018
6913345
Revert back file changes.
sanganinamrata May 18, 2018
c842b24
Refactor message popup js
RahulKachhadia May 19, 2018
f584b42
Fixed coding standard issue.
gelanivishal May 19, 2018
da28c01
Updated coding standard issue
gelanivishal May 20, 2018
71395ad
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 22, 2018
c5f4f61
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 24, 2018
875b18e
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 25, 2018
5d6896b
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-88814
fascinosum May 25, 2018
d77efd8
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 25, 2018
285c535
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-88814
fascinosum May 25, 2018
d8a6082
MAGETWO-88814: [Performance] Some indexes become recreated on db with…
fascinosum May 26, 2018
5076e11
Forward port of 15097 to 2.3-develop branch.
dverkade May 9, 2018
eea948d
Variant product image in sidebar wishlist block
kp-drc May 24, 2018
fb913ad
Update Wishlist.php
kishanpatadia May 24, 2018
ce176d2
#12601 - A space between the category page and the main footer when a…
sanjay-wagento Jan 3, 2018
7f34b22
#15564 Generated admin API token expires immediately
krukas May 30, 2018
349d178
Remove tab
krukas May 30, 2018
1cc9e37
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-88814
fascinosum Jun 4, 2018
af0c159
Merge pull request #1 from NamrataChangani/2.3-develop-PR-port-15302
sanganinamrata Jun 5, 2018
0f23ed7
Add missing table aliases to fields mapping for Customer Group filter…
Jun 5, 2018
37150ff
MAGETWO-91497: Product websites are not honored
danielrenaud Jun 5, 2018
2d20379
MAGETWO-92131: Slow Catalog Search Indexer [Performance]
zakdma Jun 6, 2018
de8066c
MAGETWO-91497: Product websites are not honored
danielrenaud Jun 6, 2018
1a76cdb
Merge pull request #2 from NamrataChangani/2.3-develop-PR-port-15795
sanganinamrata Jun 7, 2018
083447a
Merge pull request #3 from NamrataChangani/2.3-develop-PR-port-15825
sanganinamrata Jun 7, 2018
0c11c05
Merge branch '2.3-develop' into MAGETWO-92131
zakdma Jun 7, 2018
d9f6941
MAGETWO-91497: Product websites are not honored
danielrenaud Jun 8, 2018
6387893
during product import, use correct error message for duplicate error key
denteblu Jun 10, 2018
78630e9
Updated according to coding style requirements
ishakhsuvarov Jun 11, 2018
474385a
ENGCOM-1944: Use correct error message for duplicate error key in pro…
magento-engcom-team Jun 11, 2018
c160fc7
MAGETWO-91497: Product websites are not honored
danielrenaud Jun 11, 2018
719d258
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9149…
danielrenaud Jun 11, 2018
0381cab
MAGETWO-92788: Can't add a configurable product to the shopping cart …
zakdma Jun 14, 2018
e3ab520
DEVOPS-2632: Sample Data Builds Migrated from Bamboo
slavvka Jun 14, 2018
1732d42
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-92788
OlgaVasyltsun Jun 15, 2018
12c22f3
Merge remote-tracking branch 'origin/MAGETWO-92131' into 2.3-develop-…
zakdma Jun 15, 2018
e9921e0
MAGETWO-92826: Fatal error during multishipping checkout
DianaRusin Jun 18, 2018
317a76c
Merge remote-tracking branch 'upstream/2.3-develop' into MAGETWO-9149…
Jun 18, 2018
f2cc71c
Merge remote-tracking branch 'mainline/2.3-develop' into DEVOPS-2632-2.3
slavvka Jun 18, 2018
57b9cd2
Correct return type of methods and typo correction.
Jun 11, 2018
bd15eb3
bool primitive type in return type
Jun 15, 2018
3000eac
Remove unneeded class import
orlangur Jun 15, 2018
849d23d
Navigation dropdown caret icon.
tejashkumbhare Jun 13, 2018
f4912a2
Removed unnecessary blank line from xml.
sanganinamrata Jun 16, 2018
b01a948
Fixed syntax for before-after operators in less files.
sanganinamrata Jun 16, 2018
010b16f
Correct sentence in comment section in class file.
sanganinamrata Jun 16, 2018
9777137
ENGCOM-2038: Navigation dropdown caret icon. #16225
magento-engcom-team Jun 19, 2018
d934010
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr24
zakdma Jun 19, 2018
8e05035
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-92826
zakdma Jun 19, 2018
c40cafa
Merge remote-tracking branch 'origin/MAGETWO-92826' into 2.3-develop-…
zakdma Jun 19, 2018
1525c69
MAGETWO-92308: Wrong price and Cart Subtotal at mini shopping cart
zakdma Jun 19, 2018
c8e7c0c
ENGCOM-2043: [Forwardport] Correct return type of methods and typo co…
magento-engcom-team Jun 19, 2018
9912388
Added integration test for checking admin login attempts cleanup
rogyar Jun 19, 2018
5bf729c
Missing copyrights added
rogyar Jun 19, 2018
a34c148
array_push(...) calls behaving as '$array[] = ...', $array[] = works …
lfluvisotto Jun 14, 2018
6794646
Merge remote-tracking branch 'mainline/2.3-develop' into DEVOPS-2632-2.3
slavvka Jun 19, 2018
39b1462
DEVOPS-2632: Sample Data Builds Migrated from Bamboo
slavvka Jun 19, 2018
79bd644
MAGETWO-92877: Write Core Application Logs to Syslog
shiftedreality Jun 19, 2018
aec7fa3
MAGETWO-92877: Write Core Application Logs to Syslog
shiftedreality Jun 19, 2018
3422dae
merge magento/2.3-develop into magento-borg/DEVOPS-2632-2.3
Jun 19, 2018
a108233
magento/magento2#15255 unlock customer after password reset
andreagaspardo May 26, 2018
860b2d0
Merge remote-tracking branch 'origin/MAGETWO-92308' into 2.3-develop-…
OlgaVasyltsun Jun 20, 2018
c4e0e58
ENGCOM-2054: [Forwardport] array_push(...) calls behaving as '$array[…
magento-engcom-team Jun 20, 2018
94db8ff
ENGCOM-2060: magento/magento2#15255 unlock customer after password re…
magento-engcom-team Jun 20, 2018
88fae0a
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr24
zakdma Jun 20, 2018
303f1f0
ENGCOM-2063: [FORWARDPORT #15097] Add field to filter to collection #…
magento-engcom-team Jun 20, 2018
67d2dc2
ENGCOM-2064: [Forwardport] Variant product image in sidebar wishlist …
magento-engcom-team Jun 20, 2018
dac6f9d
ENGCOM-2065: Forwardport] Feature space between category page #1 #15726
magento-engcom-team Jun 20, 2018
9669bd6
ENGCOM-2066: [Forwardport] [BUGFIX] #15564 Generated admin API token …
magento-engcom-team Jun 20, 2018
2884e23
ENGCOM-2067: [Forwardport] Add missing table aliases to fields mappin…
magento-engcom-team Jun 20, 2018
b91cdef
merge magento/2.3-develop into magento-borg/MAGETWO-91497-product-web…
Jun 20, 2018
badfe3c
Simplified TypeProcessor
YevSent Jun 20, 2018
54e1a71
MAGETWO-61209: Fixed issue with mage/calendar when setting `numberOfM…
Jun 20, 2018
e874ff0
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-61209-…
Jun 20, 2018
683115a
merge magento/2.3-develop into magento-borg/DEVOPS-2632-2.3
Jun 20, 2018
fcffcc1
ENGCOM-2074: Simplified TypeProcessor #16275
magento-engcom-team Jun 20, 2018
092e6ec
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 17, 2018
c180386
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 24, 2018
85a98b2
DOBISSUE date format changed after customer tries to register with sa…
KaushikChavda May 24, 2018
b6375da
DOBISSUE fix travis-ci error.
KaushikChavda May 24, 2018
0973ca3
DOBUSSUE fixed On Create New Customer Account page DOB field always c…
KaushikChavda Jun 13, 2018
42992be
ENGCOM-2075: [Forwardport] DOBISSUE date format changed after custome…
magento-engcom-team Jun 21, 2018
a5245cd
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr24
zakdma Jun 21, 2018
7cebc0a
ENGCOM-2074: Simplified TypeProcessor #16275
Jun 21, 2018
31b92c9
ENGCOM-2067: [Forwardport] Add missing table aliases to fields mappin…
Jun 21, 2018
382c84c
ENGCOM-2066: [Forwardport] [BUGFIX] #15564 Generated admin API token …
Jun 21, 2018
6b168c5
ENGCOM-2065: Forwardport] Feature space between category page #1 #15726
Jun 21, 2018
51d838c
ENGCOM-2064: [Forwardport] Variant product image in sidebar wishlist …
Jun 21, 2018
7a308a2
ENGCOM-2063: [FORWARDPORT #15097] Add field to filter to collection #…
Jun 21, 2018
8843aa2
ENGCOM-2060: magento/magento2#15255 unlock customer after password re…
Jun 21, 2018
e57d347
ENGCOM-2054: [Forwardport] array_push(...) calls behaving as '$array[…
Jun 21, 2018
e35df97
ENGCOM-2043: [Forwardport] Correct return type of methods and typo co…
Jun 21, 2018
ea666af
ENGCOM-2038: Navigation dropdown caret icon. #16225
Jun 21, 2018
73a3438
ENGCOM-1944: Use correct error message for duplicate error key in pro…
Jun 21, 2018
9e3d468
ENGCOM-2081: [Forwardport] Refactored javascript code of admin notifi…
magento-engcom-team Jun 21, 2018
89ca28f
Improve trim email address in customer account login page
dankhrapiyush Jun 21, 2018
5c1e8f7
Remove blank line at eof in trim-input.js
dankhrapiyush Jun 21, 2018
2697952
Merge pull request #2732 from magento-tsg/2.3-develop-pr24
Jun 21, 2018
bfce026
Trim email address in customer account create page
dankhrapiyush Jun 21, 2018
472c141
Trim email address in customer authentication popup
dankhrapiyush Jun 21, 2018
4bc0d18
[EngCom] Public Pull Requests - 2.3-develop
magento-engcom-team Jun 21, 2018
fb735e0
ENGCOM-2082: [Forwardport 2.3] Trim email address in customer account…
magento-engcom-team Jun 21, 2018
a0ff63d
Merge branch '2.3-develop' of https://github.com/magento/magento2ce i…
shiftedreality Jun 21, 2018
c873f14
Strict types added
rogyar Jun 21, 2018
dcca458
:arrows_clockwise: [EngCom] Public Pull Requests - 2.3-develop
magento-engcom-team Jun 21, 2018
81d8ea6
merge magento/2.3-develop into magento-borg/MAGETWO-91497-product-web…
Jun 21, 2018
63cef66
merge magento/2.3-develop into magento-borg/DEVOPS-2632-2.3
Jun 21, 2018
fe3564f
Minor improvements
rogyar Jun 21, 2018
70c5c51
Merge pull request #2728 from magento-borg/MAGETWO-91497-product-website
cpartica Jun 21, 2018
2ee4bf3
ENGCOM-2092: [Forwardport 2.3] Captcha: Added integration test for ch…
magento-engcom-team Jun 21, 2018
057a6b7
Merge pull request #6 from NamrataChangani/2.3-develop-PR-port-16181
sanganinamrata Jun 22, 2018
5a7d18d
Merge pull request #4 from NamrataChangani/2.3-develop-PR-port-16183
sanganinamrata Jun 22, 2018
a6616eb
ENGCOM-2099: [Fowardport] Correct sentence in comment section in clas…
magento-engcom-team Jun 22, 2018
b6a7bb9
Correct code formatting
hitesh-wagento Jun 5, 2018
0b412dc
Correct code formatting
hitesh-wagento Jun 5, 2018
da4584b
Correct code formatting
hitesh-wagento Jun 5, 2018
2dd2c77
Correct code formatting
hitesh-wagento Jun 5, 2018
0cb6d7e
ENGCOM-2101: [Forwardport] [Correct code formatting] #16321
magento-engcom-team Jun 22, 2018
56d3c45
Fixed typo error
gelanivishal Jun 19, 2018
c9c9472
ENGCOM-2103: [Forwardport] Fixed typo error #16326
magento-engcom-team Jun 22, 2018
ba6af44
Merge branch '2.3-develop' of https://github.com/magento/magento2ce i…
shiftedreality Jun 22, 2018
584a1c7
ENGCOM-2105: MAGETWO-61209: Issue #7379 Calendar widget (jQuery UI Da…
magento-engcom-team Jun 22, 2018
58dd07a
ENGCOM-1514: Issue 14351: Product import doesn't change \`Enable Qty…
magento-engcom-team Jun 22, 2018
d7cbc94
merge magento/2.3-develop into magento-arcticfoxes/MAGETWO-88814
Jun 22, 2018
345823b
Merge pull request #2738 from magento-thunder/MAGETWO-92877
arhiopterecs Jun 22, 2018
4026499
merge magento/2.3-develop into magento-arcticfoxes/MAGETWO-88814
Jun 22, 2018
caf42c9
Merge remote-tracking branch 'mainline/2.3-develop' into DEVOPS-2632-2.3
slavvka Jun 22, 2018
1a06f4a
Merge pull request #2745 from magento-arcticfoxes/MAGETWO-88814
cpartica Jun 22, 2018
40ce12d
Merge remote-tracking branch 'mainline/2.3-develop' into DEVOPS-2632-2.3
slavvka Jun 22, 2018
92b9a39
Merge pull request #2719 from magento-borg/DEVOPS-2632-2.3
slavvka Jun 22, 2018
235e08a
ENGCOM-2105: MAGETWO-61209: Issue #7379 Calendar widget (jQuery UI Da…
Jun 23, 2018
a0f04c7
ENGCOM-2103: [Forwardport] Fixed typo error #16326
Jun 23, 2018
08e0aac
ENGCOM-2101: [Forwardport] [Correct code formatting] #16321
Jun 23, 2018
ae00d88
ENGCOM-2099: [Fowardport] Correct sentence in comment section in clas…
Jun 23, 2018
d927f46
ENGCOM-2092: [Forwardport 2.3] Captcha: Added integration test for ch…
Jun 23, 2018
60521be
ENGCOM-2082: [Forwardport 2.3] Trim email address in customer account…
Jun 23, 2018
34def88
ENGCOM-2081: [Forwardport] Refactored javascript code of admin notifi…
Jun 23, 2018
557c3d1
ENGCOM-2075: [Forwardport] DOBISSUE date format changed after custome…
Jun 23, 2018
080a6ec
ENGCOM-1514: Issue 14351: Product import doesn't change `Enable Qty …
Jun 23, 2018
3d1babc
Fixed static test failures
Jun 23, 2018
4b49996
:arrows_clockwise: [EngCom] Public Pull Requests - 2.3-develop
Jun 25, 2018
e7f2462
Add UpdatedAtListProvider to NotSyncedDataProvider for invoice grid
Jun 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@
</ul>
</div>

<script>
require([
"jquery",
"Magento_Ui/js/modal/modal"
], function($){
if (this.modal) {
this.modal.html($('[data-role="system_messages_list"]').html());
} else {
this.modal = $('[data-role="system_messages_list"]').modal({
modalClass: 'modal-system-messages ui-popup-message',
type: 'popup',
buttons: []
});
<script type="text/x-magento-init">
{
"[data-role=system_messages_list]": {
"Magento_AdminNotification/js/system/messages/popup": {
class: 'modal-system-messages ui-popup-message'
}
}
}
this.modal.modal('openModal');
});
</script>
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
'jquery',
'Magento_Ui/js/modal/modal'
], function ($) {
'use strict';

return function (data, element) {
if (this.modal) {
this.modal.html($(element).html());
} else {
this.modal = $(element).modal({
modalClass: data.class,
type: 'popup',
buttons: []
});
}
this.modal.modal('openModal');
};
});
23 changes: 5 additions & 18 deletions app/code/Magento/Catalog/Model/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ protected function initializeProductData(array $productData, $createNew)
unset($productData['media_gallery']);
if ($createNew) {
$product = $this->productFactory->create();
if ($this->storeManager->hasSingleStore()) {
$product->setWebsiteIds([$this->storeManager->getStore(true)->getWebsiteId()]);
}
$this->assignProductToWebsites($product);
} else {
$this->removeProductFromLocalCache($productData['sku']);
$product = $this->get($productData['sku']);
Expand All @@ -345,31 +343,20 @@ protected function initializeProductData(array $productData, $createNew)
foreach ($productData as $key => $value) {
$product->setData($key, $value);
}
$this->assignProductToWebsites($product, $createNew);

return $product;
}

/**
* @param \Magento\Catalog\Model\Product $product
* @param bool $createNew
* @return void
*/
private function assignProductToWebsites(\Magento\Catalog\Model\Product $product, $createNew)
private function assignProductToWebsites(\Magento\Catalog\Model\Product $product)
{
$websiteIds = $product->getWebsiteIds();

if (!$this->storeManager->hasSingleStore()) {
$websiteIds = array_unique(
array_merge(
$websiteIds,
[$this->storeManager->getStore()->getWebsiteId()]
)
);
}

if ($createNew && $this->storeManager->getStore(true)->getCode() == \Magento\Store\Model\Store::ADMIN_CODE) {
if ($this->storeManager->getStore(true)->getCode() == \Magento\Store\Model\Store::ADMIN_CODE) {
$websiteIds = array_keys($this->storeManager->getWebsites());
} else {
$websiteIds = [$this->storeManager->getStore()->getWebsiteId()];
}

$product->setWebsiteIds($websiteIds);
Expand Down
14 changes: 0 additions & 14 deletions app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ public function testGetBySkuFromCacheInitializedInGetById()

public function testSaveExisting()
{
$this->storeManagerMock->expects($this->any())->method('getWebsites')->willReturn([1 => 'default']);
$this->resourceModelMock->expects($this->any())->method('getIdBySku')->will($this->returnValue(100));
$this->productFactoryMock->expects($this->any())
->method('create')
Expand All @@ -566,7 +565,6 @@ public function testSaveExisting()
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->productMock->expects($this->atLeastOnce())->method('getSku')->willReturn($this->productData['sku']);

$this->assertEquals($this->productMock, $this->model->save($this->productMock));
Expand All @@ -588,7 +586,6 @@ public function testSaveNew()
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->method('getWebsiteIds')->willReturn([]);
$this->productMock->method('getSku')->willReturn('simple');

$this->assertEquals($this->productMock, $this->model->save($this->productMock));
Expand All @@ -615,7 +612,6 @@ public function testSaveUnableToSaveException()
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->method('getWebsiteIds')->willReturn([]);
$this->productMock->method('getSku')->willReturn('simple');

$this->model->save($this->productMock);
Expand All @@ -642,7 +638,6 @@ public function testSaveException()
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->productMock->method('getSku')->willReturn('simple');

$this->model->save($this->productMock);
Expand All @@ -667,7 +662,6 @@ public function testSaveInvalidProductException()
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->productMock->method('getSku')->willReturn('simple');

$this->model->save($this->productMock);
Expand Down Expand Up @@ -697,9 +691,6 @@ public function testSaveThrowsTemporaryStateExceptionIfDatabaseConnectionErrorOc
->expects($this->once())
->method('toNestedArray')
->will($this->returnValue($this->productData));
$this->productMock->expects($this->once())
->method('getWebsiteIds')
->willReturn([]);
$this->productMock->method('getSku')->willReturn('simple');

$this->model->save($this->productMock);
Expand Down Expand Up @@ -847,7 +838,6 @@ public function testSaveExistingWithOptions(array $newOptions, array $existingOp
->method('toNestedArray')
->will($this->returnValue($this->productData));

$this->initializedProductMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->initializedProductMock->expects($this->atLeastOnce())
->method('getSku')->willReturn($this->productData['sku']);
$this->productMock->expects($this->atLeastOnce())->method('getSku')->willReturn($this->productData['sku']);
Expand Down Expand Up @@ -1083,7 +1073,6 @@ public function testSaveWithLinks(array $newLinks, array $existingLinks, array $
$outputLinks[] = $outputLink;
}
}
$this->initializedProductMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);

if (!empty($outputLinks)) {
$this->initializedProductMock->expects($this->once())
Expand Down Expand Up @@ -1264,7 +1253,6 @@ public function testSaveExistingWithNewMediaGalleryEntries()
'media_type' => 'media_type',
]
);
$this->initializedProductMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->initializedProductMock->expects($this->atLeastOnce())
->method('getSku')->willReturn($this->productData['sku']);
$this->productMock->expects($this->atLeastOnce())->method('getSku')->willReturn($this->productData['sku']);
Expand Down Expand Up @@ -1305,7 +1293,6 @@ public function testSaveWithDifferentWebsites()
2 => ['second'],
3 => ['third']
]);
$this->productMock->expects($this->once())->method('getWebsiteIds')->willReturn([1,2,3]);
$this->productMock->expects($this->once())->method('setWebsiteIds')->willReturn([2,3]);
$this->productMock->method('getSku')->willReturn('simple');

Expand Down Expand Up @@ -1377,7 +1364,6 @@ public function testSaveExistingWithMediaGalleryEntries()
$this->mediaGalleryProcessor->expects($this->once())
->method('setMediaAttribute')
->with($this->initializedProductMock, ['image', 'small_image'], 'filename1');
$this->initializedProductMock->expects($this->once())->method('getWebsiteIds')->willReturn([]);
$this->initializedProductMock->expects($this->atLeastOnce())
->method('getSku')->willReturn($this->productData['sku']);
$this->productMock->expects($this->atLeastOnce())->method('getSku')->willReturn($this->productData['sku']);
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Catalog/etc/adminhtml/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<add id="Magento_Catalog::catalog_categories" title="Categories" translate="title" module="Magento_Catalog" sortOrder="20" parent="Magento_Catalog::inventory" action="catalog/category/" resource="Magento_Catalog::categories"/>
<add id="Magento_Catalog::catalog_attributes_attributes" title="Product" translate="title" module="Magento_Catalog" sortOrder="30" parent="Magento_Backend::stores_attributes" action="catalog/product_attribute/" resource="Magento_Catalog::attributes_attributes"/>
<add id="Magento_Catalog::catalog_attributes_sets" title="Attribute Set" translate="title" module="Magento_Catalog" sortOrder="40" parent="Magento_Backend::stores_attributes" action="catalog/product_set/" resource="Magento_Catalog::sets"/>

<add id="Magento_Catalog::inventory" title="Inventory" translate="title" module="Magento_Catalog" sortOrder="10" parent="Magento_Catalog::catalog" dependsOnModule="Magento_Catalog" resource="Magento_Catalog::catalog"/>
</menu>
</config>
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@
<constraint xsi:type="foreign" name="CAT_PRD_FRONTEND_ACTION_CSTR_ID_CSTR_ENTT_ENTT_ID"
table="catalog_product_frontend_action" column="customer_id" referenceTable="customer_entity"
referenceColumn="entity_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" name="PRODUCT_FRONTEND_ACTION_PRODUCT_ID"
<constraint xsi:type="foreign" name="CAT_PRD_FRONTEND_ACTION_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
table="catalog_product_frontend_action" column="product_id" referenceTable="catalog_product_entity"
referenceColumn="entity_id" onDelete="CASCADE" />
<constraint xsi:type="unique" name="CATALOG_PRODUCT_FRONTEND_ACTION_VISITOR_ID_PRODUCT_ID_TYPE_ID">
Expand Down
6 changes: 4 additions & 2 deletions app/code/Magento/Catalog/etc/db_schema_whitelist.json
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,8 @@
"index": {
"CAT_CTGR_PRD_IDX_REPLICA_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY": true,
"IDX_87EB2E3059853CF89A75B4C55074810B": true,
"CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY": true
"CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY": true,
"CAT_CTGR_PRD_IDX_STORE_ID_CTGR_ID_VISIBILITY_IS_PARENT_POSITION": true
},
"constraint": {
"PRIMARY": true
Expand All @@ -1114,8 +1115,9 @@
"constraint": {
"PRIMARY": true,
"CAT_PRD_FRONTEND_ACTION_CSTR_ID_CSTR_ENTT_ENTT_ID": true,
"CAT_PRD_FRONTEND_ACTION_PRD_ID_CAT_PRD_ENTT_ENTT_ID": true,
"CATALOG_PRODUCT_FRONTEND_ACTION_VISITOR_ID_PRODUCT_ID_TYPE_ID": true,
"CATALOG_PRODUCT_FRONTEND_ACTION_CUSTOMER_ID_PRODUCT_ID_TYPE_ID": true
}
}
}
}
13 changes: 11 additions & 2 deletions app/code/Magento/CatalogImportExport/Model/Import/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
use Magento\CatalogInventory\Api\Data\StockItemInterface;
use Magento\CatalogImportExport\Model\StockItemImporterInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\ObjectManager;
Expand Down Expand Up @@ -2618,7 +2619,10 @@ private function _setStockUseConfigFieldsValues($rowData)
{
$useConfigFields = [];
foreach ($rowData as $key => $value) {
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key;
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
: self::INVENTORY_USE_CONFIG_PREFIX . $key;

if (isset($this->defaultStockData[$key])
&& isset($this->defaultStockData[$useConfigName])
&& !empty($value)
Expand Down Expand Up @@ -2715,7 +2719,12 @@ protected function checkUrlKeyDuplicates()
);
foreach ($urlKeyDuplicates as $entityData) {
$rowNum = $this->rowNumbers[$entityData['store_id']][$entityData['request_path']];
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum);
$message = sprintf(
$this->retrieveMessageTemplate(ValidatorInterface::ERROR_DUPLICATE_URL_KEY),
$entityData['request_path'],
$entityData['sku']
);
$this->addRowError(ValidatorInterface::ERROR_DUPLICATE_URL_KEY, $rowNum, 'url_key', $message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(Context $context, Registry $coreRegistry)
/**
* Initialize category object in registry
*
* @return Category
* @return Category|bool
*/
protected function _initCategory()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/CatalogRule/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<constraint xsi:type="primary" name="PRIMARY">
<column name="rule_product_id"/>
</constraint>
<constraint xsi:type="unique" name="IDX_EAA51B56FF092A0DCB795D1CEF812B7B">
<constraint xsi:type="unique" name="UNQ_EAA51B56FF092A0DCB795D1CEF812B7B">
<column name="rule_id"/>
<column name="from_time"/>
<column name="to_time"/>
Expand Down Expand Up @@ -198,7 +198,7 @@
<constraint xsi:type="primary" name="PRIMARY">
<column name="rule_product_id"/>
</constraint>
<constraint xsi:type="unique" name="IDX_EAA51B56FF092A0DCB795D1CEF812B7B">
<constraint xsi:type="unique" name="UNQ_EAA51B56FF092A0DCB795D1CEF812B7B">
<column name="rule_id"/>
<column name="from_time"/>
<column name="to_time"/>
Expand Down
8 changes: 5 additions & 3 deletions app/code/Magento/CatalogRule/etc/db_schema_whitelist.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
},
"constraint": {
"PRIMARY": true,
"IDX_EAA51B56FF092A0DCB795D1CEF812B7B": true
"IDX_EAA51B56FF092A0DCB795D1CEF812B7B": true,
"UNQ_EAA51B56FF092A0DCB795D1CEF812B7B": true
}
},
"catalogrule_product_price": {
Expand Down Expand Up @@ -146,7 +147,8 @@
},
"constraint": {
"PRIMARY": true,
"UNQ_BDF2B92A4F0B28D7896648B3B8A26089": true
"IDX_EAA51B56FF092A0DCB795D1CEF812B7B": true,
"UNQ_EAA51B56FF092A0DCB795D1CEF812B7B": true
}
},
"catalogrule_product_price_replica": {
Expand Down Expand Up @@ -190,4 +192,4 @@
"PRIMARY": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function getSelectForSearchableProducts(
$lastProductId,
$batch
) {
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
$websiteId = (int)$this->storeManager->getStore($storeId)->getWebsiteId();
$lastProductId = (int) $lastProductId;

$select = $this->connection->select()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function processAttributeValue($attribute, $value)
*
* @param array $index
* @param string $separator
* @return string
* @return array
*/
public function prepareEntityIndex($index, $separator = ' ')
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ protected function orderCountryOptions(array $countryOptions)
]];
foreach ($countryOptions as $countryOption) {
if (empty($countryOption['value']) || in_array($countryOption['value'], $this->topCountryCodes)) {
array_push($headOptions, $countryOption);
$headOptions[] = $countryOption;
} else {
array_push($tailOptions, $countryOption);
$tailOptions[] = $countryOption;
}
}
return array_merge($headOptions, $tailOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ private function orderCountryOptions(array $countryOptions)
]];
foreach ($countryOptions as $countryOption) {
if (empty($countryOption['value']) || in_array($countryOption['value'], $topCountryCodes)) {
array_push($headOptions, $countryOption);
$headOptions[] = $countryOption;
} else {
array_push($tailOptions, $countryOption);
$tailOptions[] = $countryOption;
}
}
return array_merge($headOptions, $tailOptions);
Expand Down
15 changes: 6 additions & 9 deletions app/code/Magento/Checkout/view/frontend/web/js/model/totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ define([
'use strict';

var quoteItems = ko.observable(quote.totals().items),
cartData = customerData.get('cart');
cartData = customerData.get('cart'),
quoteSubtotal = parseFloat(quote.totals().subtotal),
subtotalAmount = parseFloat(cartData().subtotalAmount);

quote.totals.subscribe(function (newValue) {
quoteItems(newValue.items);
});

cartData.subscribe(function () {
var quoteSubtotal = parseFloat(quote.totals().subtotal),
subtotalAmount = parseFloat(cartData().subtotalAmount);

if (quoteSubtotal !== subtotalAmount) {
customerData.reload(['cart'], false);
}
}, this);
if (quoteSubtotal !== subtotalAmount) {
customerData.reload(['cart'], false);
}

return {
totals: quote.totals,
Expand Down
Loading