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
25
25
*/
26
26
protected function _prepareData ()
27
27
{
28
- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
28
+ $ product = $ this ->getProduct ( );
29
29
/* @var $product \Magento\Catalog\Model\Product */
30
30
31
31
$ this ->_itemCollection = $ product ->getCrossSellProductCollection ()->addAttributeToSelect (
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function __construct(
82
82
*/
83
83
protected function _prepareData ()
84
84
{
85
- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
85
+ $ product = $ this ->getProduct ( );
86
86
/* @var $product \Magento\Catalog\Model\Product */
87
87
88
88
$ this ->_itemCollection = $ product ->getRelatedProductCollection ()->addAttributeToSelect (
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public function __construct(
97
97
*/
98
98
protected function _prepareData ()
99
99
{
100
- $ product = $ this ->_coreRegistry -> registry ( ' product ' );
100
+ $ product = $ this ->getProduct ( );
101
101
/* @var $product \Magento\Catalog\Model\Product */
102
102
$ this ->_itemCollection = $ product ->getUpSellProductCollection ()->setPositionOrder ()->addStoreFilter ();
103
103
if ($ this ->moduleManager ->isEnabled ('Magento_Checkout ' )) {
You can’t perform that action at this time.
0 commit comments