Ejemplo n.º 1
0
 /**
  * @param Context $context
  * @param array $data
  * @param Product $product
  * @param Category $category
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, Product $product, Category $category, array $data = [])
 {
     $this->Product = $product;
     $this->Category = $category;
     $this->reviewRenderer = $context->getReviewRenderer();
     $this->imageHelper = $context->getImageHelper();
     parent::__construct($context, $data);
 }
 /**
  * @param Context $context
  * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Reports\Model\ResourceModel\Report\Collection\Factory $resourceFactory, \Magento\Reports\Model\Grouped\CollectionFactory $collectionFactory, \Magento\Reports\Helper\Data $reportsData, array $data = [])
 {
     $this->_resourceFactory = $resourceFactory;
     $this->_collectionFactory = $collectionFactory;
     $this->_reportsData = $reportsData;
     $this->_imageHelper = $context->getImageHelper();
     $this->_cartHelper = $context->getCartHelper();
     parent::__construct($context, $data);
 }
 /**
  * @param Context $context
  * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
  * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
  * @param \Magento\Framework\App\Http\Context $httpContext
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\App\Http\Context $httpContext, array $data = [])
 {
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->httpContext = $httpContext;
     $this->_imageHelper = $context->getImageHelper();
     $this->_cartHelper = $context->getCartHelper();
     parent::__construct($context, $data);
 }
Ejemplo n.º 4
0
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\Framework\App\Http\Context $httpContext, \Emizentech\ShopByBrand\Model\BrandFactory $brandFactory, \Magento\Framework\View\Page\Config $pageConfig, array $data = [])
 {
     $this->_productCollectionFactory = $productCollectionFactory;
     $this->_catalogProductVisibility = $catalogProductVisibility;
     $this->httpContext = $httpContext;
     $this->_imageHelper = $context->getImageHelper();
     $this->_brandFactory = $brandFactory;
     $this->_cartHelper = $context->getCartHelper();
     $this->pageConfig = $pageConfig;
     parent::__construct($context, $data);
 }
Ejemplo n.º 5
0
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Framework\Registry $registry, \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility, \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurable, \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable $catalogProductTypeConfigurable, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory, \Magento\Framework\App\ResourceConnection $resource, array $data = [])
 {
     $this->_collectionFactory = $collectionFactory;
     $this->_coreRegistry = $registry;
     $this->_imageHelper = $context->getImageHelper();
     $this->catalogProductVisibility = $catalogProductVisibility;
     $this->_productFactory = $productFactory;
     $this->_configurable = $configurable;
     $this->_productCollectionFactory = $productCollectionFactory;
     //for getting parent id of simple
     $this->_catalogProductTypeConfigurable = $catalogProductTypeConfigurable;
     $this->_resource = $resource;
     parent::__construct($context, $data);
 }
Ejemplo n.º 6
0
 /**
  * @param Context $context
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, array $data = [])
 {
     $this->_imageHelper = $context->getImageHelper();
     $this->imageBuilder = $context->getImageBuilder();
     $this->_compareProduct = $context->getCompareProduct();
     $this->_wishlistHelper = $context->getWishlistHelper();
     $this->_cartHelper = $context->getCartHelper();
     $this->_catalogConfig = $context->getCatalogConfig();
     $this->_coreRegistry = $context->getRegistry();
     $this->_taxData = $context->getTaxData();
     $this->_mathRandom = $context->getMathRandom();
     $this->reviewRenderer = $context->getReviewRenderer();
     $this->stockRegistry = $context->getStockRegistry();
     parent::__construct($context, $data);
 }