skip to Main Content

Magento2 Add Product Attribute Not Working

I have created a file setup/installdata.php: use MagentoEavSetupEavSetup; use MagentoEavSetupEavSetupFactory; use MagentoFrameworkSetupInstallDataInterface; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupModuleDataSetupInterface; class InstallData implements InstallDataInterface { private $eavSetupFactory; public function __construct(EavSetupFactory $eavSetupFactory) { $this->eavSetupFactory = $eavSetupFactory; } public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $eavSetup…

VIEW QUESTION

Magento 2.2 product collection factory not returning all products

I'm trying to get all products using collectionFactory in a custom module like this: $products = $this->_productCollectionFactory->create(); ->addAttributeToSelect('*'); where _productCollectionFactory is initialized in the __construct() as an instance of MagentoCatalogModelResourceModelProductCollectionFactory $productCollectionFactory, the problem is that, without any applied filter, the…

VIEW QUESTION
Back To Top
Search