Skip to content

Instantly share code, notes, and snippets.

@ldusan84
Created February 10, 2017 15:43
Show Gist options
  • Save ldusan84/35e6b290c77d30261fece04308bfddd2 to your computer and use it in GitHub Desktop.
Save ldusan84/35e6b290c77d30261fece04308bfddd2 to your computer and use it in GitHub Desktop.
<?php
ini_set('display_errors',1);
error_reporting(E_ALL^E_STRICT);
require_once('app/Mage.php');
Mage::app();
$collection = Mage::getModel('catalog/product')->getCollection();
foreach ($collection as $product) {
if ($product->isConfigurable()) {
$usedAttributeIds = $product->getTypeInstance()->getUsedProductAttributeIds();
if (count($usedAttributeIds) == 0) {
var_dump($product->getSku());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment