New answers tagged

0

Please refer to this image Please use a text editor and there you can upload an image and call that attribute in frontend Thanks Happy coding


1

Try to use Option factory $obj->create('\Magento\Catalog\Model\Product\OptionFactory')->create() ->setProductId($_product->getId()) ->setStoreId($_product->getStoreId()) ->addData($inputbox); $option->save(); Hope it would help :)


0

Please try below code. Hope it will work. What i did is just moved $productrepo line inside loop. <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $params = $_SERVER; $bootstrap = Bootstrap::create(BP, $params); $obj = $bootstrap->getObjectManager(); $state = $obj->get('Magento\Framework\App\State'); $...


0

I tried $eavSetup->addAttributeOption ,But it's not working for text swatch type attributes. So got a way which is working for all type of attributes. Reference Class: Magento\Catalog\Model\ResourceModel\Attribute\Entity\AttributeTest Method : removeAttributeOption $eavConfig = $object_Manager->get('\Magento\Eav\Model\Config'); $attribute = $...


Top 50 recent answers are included