Skip to content

Instantly share code, notes, and snippets.

@WENKz
Created July 28, 2015 11:26
Show Gist options
  • Save WENKz/329f58b80611cca0ef01 to your computer and use it in GitHub Desktop.
Save WENKz/329f58b80611cca0ef01 to your computer and use it in GitHub Desktop.
liste marque
<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
Mage::app();
$attributes = Mage::getSingleton('eav/config')
->getEntityType(Mage_Catalog_Model_Product::ENTITY)
->getAttributeCollection()
->addSetInfo();
foreach ($attributes as $attribute)
{
if ($attribute->usesSource())
{ if($attribute->getFrontendLabel() == "Marque"){
echo "{$attribute->getFrontendLabel()}:\n";
foreach ($attribute->getSource()->getAllOptions() as $option)
{
echo " {$option['label']}<br/>";
}
echo "\n";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment