File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
app/code/Magento/Catalog/Block/Product/ProductList Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
2525 */
2626 protected function _prepareData ()
2727 {
28- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
28+ $ product = $ this ->getProduct ( );
2929 /* @var $product \Magento\Catalog\Model\Product */
3030
3131 $ this ->_itemCollection = $ product ->getCrossSellProductCollection ()->addAttributeToSelect (
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function __construct(
8282 */
8383 protected function _prepareData ()
8484 {
85- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
85+ $ product = $ this ->getProduct ( );
8686 /* @var $product \Magento\Catalog\Model\Product */
8787
8888 $ this ->_itemCollection = $ product ->getRelatedProductCollection ()->addAttributeToSelect (
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public function __construct(
9797 */
9898 protected function _prepareData ()
9999 {
100- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
100+ $ product = $ this ->getProduct ( );
101101 /* @var $product \Magento\Catalog\Model\Product */
102102 $ this ->_itemCollection = $ product ->getUpSellProductCollection ()->setPositionOrder ()->addStoreFilter ();
103103 if ($ this ->moduleManager ->isEnabled ('Magento_Checkout ' )) {
You can’t perform that action at this time.
0 commit comments