Skip to main content

Posts

Showing posts with the label product option values

magento2 get all customizable option from products

create test file in root directory and place the below code excute it with domain/test.php <?php     //THis is test     echo '<pre>';     error_reporting(0);     ini_set('display_errors', 1);     use Magento\Framework\App\Bootstrap;     include('app/bootstrap.php');     $bootstrap = Bootstrap::create(BP, $_SERVER);     $objectManager = $bootstrap->getObjectManager();     $url = \Magento\Framework\App\ObjectManager::getInstance();     $storeManager = $url->get('\Magento\Store\Model\StoreManagerInterface');     $websiteId = $storeManager->getWebsite()->getWebsiteId();     $state = $objectManager->get('\Magento\Framework\App\State');     $state->setAreaCode('frontend');     //$product = $objectManager->get('\Magento\Catalog\Model\Product')->load('2331');     $productCollection = $objectManager-     >create('Magento\Catalog\Model\ResourceModel\Product\Collection