tuan
9/15/2015 - 9:01 AM

Get list product have option #Magento #Product #Option

Get list product have option #Magento #Product #Option

<?php
$checkProductHaveOption = function() {

    $productIds = Mage::getModel('catalog/product')->getCollection()->getAllIds();
    $productModel = Mage::getModel('catalog/product');
    $arrProductIdHaveOption = array();
    foreach ($productIds as $key =>$productId ) {
        $productObj = $productModel->load($productId);

        if($productObj->getHasOptions())  {
            $arrProductIdHaveOption[] = $productObj->getId();
        }
    }

    return $arrProductIdHaveOption;
};