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