skip to Main Content

Magento 2 InstallSchema method not executed

On my own Magento 2 custom module, I want to install a custom database table. This is the InstallSchema class code: <?php namespace MyVendorMyModuleSetup; use MagentoFrameworkSetupInstallSchemaInterface; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupSchemaSetupInterface; class InstallSchema implements InstallSchemaInterface { /** * @inheritdoc */ public…

VIEW QUESTION

Get dropdown attribute text – Magento 2

I am trying to retrieve the text value for the manufacturer attribute. It is a dropdown field. I tried this: $manufacturerName = $_product->getAttributeText('manufacturer'); $manufacturerId = $_product->getManufacturer(); $manufacturerName should display "BrandName", but it always displays 1 even if I change the…

VIEW QUESTION
Back To Top
Search