Created
December 10, 2013 15:31
-
-
Save peterjaap/7892509 to your computer and use it in GitHub Desktop.
Revisions
-
peterjaap created this gist
Dec 10, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ <?php chdir(dirname(__FILE__)); require_once '../app/Mage.php'; Mage::app(); umask(0); $productModel = Mage::getModel('Mage_Catalog_Model_Product'); $categoryModel = Mage::getModel('Mage_Catalog_Model_Category'); $resource = Mage::getModel('core/resource'); $db = $resource->getConnection('core_write'); $attributes = Mage::getSingleton('eav/config') ->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getAttributeCollection(); foreach($attributes as $attribute) { #if(!$attribute->getIsUserDefined()) continue; if($attribute->getEntityTypeId() != 4) continue; if($attribute->getFrontendInput() != 'select' && $attribute->getFrontendInput() != 'multiselect') continue; echo $attribute->getFrontendLabel(). ' (' . $attribute->getAttributeCode() . ')' . "\n"; foreach ($attribute->getSource()->getAllOptions(false) as $option) { if(empty($option['label'])) continue; echo "," . $option['label']."\n"; } echo "================,=================\n"; }