Skip to content

Commit c0960da

Browse files
author
mastiuhin-olexandr
committed
MC-35416: It is not possible to Manage Shopping Cart from Customer edit page after adding product to Wish List
1 parent 61d1565 commit c0960da

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ protected function _renderFiltersBefore()
400400
['cat_prod' => $this->getTable('catalog_product_entity')],
401401
$this->getConnection()
402402
->quoteInto(
403-
'cat_prod.type_id IN (?) AND main_table.product_id = cat_prod.entity_id',
403+
"cat_prod.type_id IN (?) AND {$mainTableName}.product_id = cat_prod.entity_id",
404404
$availableProductTypes
405405
),
406406
[]

dev/tests/integration/testsuite/Magento/Wishlist/Model/ResourceModel/Item/CollectionTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ public function testLoadedProductAttributes()
6969
*
7070
* @magentoDataFixture Magento/Catalog/_files/second_product_simple.php
7171
* @magentoDataFixture Magento/Wishlist/_files/wishlist.php
72+
* @magentoDbIsolation disabled
7273
*/
73-
public function testGonnaCutYouDown()
74+
public function testLoadWhenFewProductsPresent()
7475
{
7576
$this->itemCollection->setSalableFilter(true);
77+
$this->itemCollection->addCustomerIdFilter(1);
7678
$this->itemCollection->load();
79+
$this->assertCount(1, $this->itemCollection->getItems());
7780
}
7881

7982
/**

0 commit comments

Comments
 (0)