Skip to content

Commit 26b64ac

Browse files
isydorenkoschmengler
authored andcommitted
Fixed using catalog_attributes.xml in wishlist item collection
1 parent 7d36238 commit 26b64ac

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -284,20 +284,10 @@ protected function _assignProducts()
284284
$productCollection->setVisibility($this->_productVisibility->getVisibleInSiteIds());
285285
}
286286

287-
$attributesToSelect = [
288-
'name',
289-
'visibility',
290-
'small_image',
291-
'thumbnail',
292-
'links_purchased_separately',
293-
'links_title',
294-
'price_type'
295-
];
296-
297287
$productCollection->addPriceData()
298288
->addTaxPercents()
299289
->addIdFilter($this->_productIds)
300-
->addAttributeToSelect($attributesToSelect)
290+
->addAttributeToSelect($this->_wishlistConfig->getProductAttributes())
301291
->addOptionsToResult()
302292
->addUrlRewrite();
303293

app/code/Magento/Wishlist/etc/catalog_attributes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd">
99
<group name="wishlist_item">
10+
<attribute name="name"/>
11+
<attribute name="small_image"/>
12+
<attribute name="thumbnail"/>
13+
<attribute name="links_purchased_separately"/>
14+
<attribute name="links_title"/>
15+
<attribute name="price_type"/>
1016
<attribute name="visibility"/>
1117
<attribute name="url_path"/>
1218
<attribute name="url_key"/>

0 commit comments

Comments
 (0)