Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Controller
Product.php
Go to the documentation of this file.
1
<?php
8
namespace
Magento\Catalog\Controller
;
9
10
use
Magento\Catalog\Controller\Product\View\ViewInterface
;
11
use
Magento\Catalog\Model\Product
as
ModelProduct
;
12
13
abstract
class
Product
extends
\Magento\Framework\App\Action\Action
implements
ViewInterface
14
{
20
protected
function
_initProduct()
21
{
22
$categoryId = (int)$this->
getRequest
()->getParam(
'category'
,
false
);
23
$productId
= (int)$this->
getRequest
()->getParam(
'id'
);
24
25
$params
= new \Magento\Framework\DataObject();
26
$params
->setCategoryId($categoryId);
27
29
$product
= $this->_objectManager->get(\
Magento
\Catalog\Helper\Product::class);
30
return
$product
->initProduct(
$productId
, $this,
$params
);
31
}
32
}
$productId
$productId
Definition:
website_attribute_sync.php:26
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
Magento
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Catalog\Controller\Product\View\ViewInterface
Definition:
ViewInterface.php:16
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Magento\Catalog\Controller
Magento\Framework\App\Action\Action
Definition:
Action.php:25
Magento\Catalog\Controller\Product
Definition:
Product.php:13