2

Try the below code: $option_id = 5431; $attribute_code = 'coffee_type'; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $eavConfig = $objectManager->get('\Magento\Eav\Model\Config'); $attribute = $eavConfig->getAttribute('catalog_product', $attribute_code); $optionlabel = $attribute->getSource()->...


2

try this The filters in the layered navigation are being built in this file: First, replace the below code if it works then use it to plugin and write logic. vendor/magento/module-catalog/Model/Layer/FilterList.php public function getFilters(\Magento\Catalog\Model\Layer $layer) { if (!count($this->filters)) { $this->filters ...


1

Method 1: echo $_product->getAttributeText('manufacturer'); Method 2: $manufacturer = $_product->getResource()->getAttribute('manufacturer'); echo $manufacturer->getFrontend()->getLabel($_product);


1

Check below code InstallData.php:- sets up data when the module is installed. File:-Vendor/Module/Setup/InstallData.php <?php namespace Vendor\Module\Setup; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Customer\Model\Customer; ...


Only top voted, non community-wiki answers of a minimum length are eligible