2011-08-30 172 views

回答

1

我解决了这个问题:

require_once 'app/Mage.php'; 
Mage::app(''); 
$attribute = Mage::getModel('eav/config') 
      ->getAttribute('catalog_product', '955'); 
    foreach ($attribute->getSource()->getAllOptions(true) as $option){ 

    //here comes the code sample (see link before) 
        . 
        . 
        . 
    $product->setMyCustomAttribute($option['value']); 
} 
+0

请注明自己的答案被接受,它是允许的,甚至是计算器的规则建议。 – Zyava

相关问题