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 @@ -81,7 +81,7 @@ public function __construct(
8181 */
8282 protected function _prepareData ()
8383 {
84- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
84+ $ product = $ this ->getProduct ( );
8585 /* @var $product \Magento\Catalog\Model\Product */
8686
8787 $ this ->_itemCollection = $ product ->getRelatedProductCollection ()->addAttributeToSelect (
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ public function __construct(
9595 */
9696 protected function _prepareData ()
9797 {
98- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
98+ $ product = $ this ->getProduct ( );
9999 /* @var $product \Magento\Catalog\Model\Product */
100100 $ this ->_itemCollection = $ product ->getUpSellProductCollection ()->setPositionOrder ()->addStoreFilter ();
101101 if ($ this ->moduleManager ->isEnabled ('Magento_Checkout ' )) {
You can’t perform that action at this time.
0 commit comments