Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. $name='color';
  2. $attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($name)->getFirstItem();
  3. $attributeId = $attributeInfo->getAttributeId();
  4. $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
  5. $attributeOptions = $attribute ->getSource()->getAllOptions(false);
  6.  
  7. (
  8. [0] => Array
  9. (
  10. [value] => 6
  11. [label] => blueAdmin
  12. )
  13. [1] => Array
  14. (
  15. [value] => 5
  16. [label] => coralAdmin
  17. )
  18. [2] => Array
  19. (
  20. [value] => 3
  21. [label] => redAdmin
  22. )
  23. [3] => Array
  24. (
  25. [value] => 4
  26. [label] => limeAdmin
  27. )
  28. )
  29.  
  30. $attributeOptions = $attribute->setStoreId(1)->getSource()->getAllOptions(false);
  31.  
  32. Mage::app()->getStore()->getId();
  33.  
  34. $storeId = Mage::app()->getStore()->getId();
  35. $attributeOptions = $attribute->setStoreId($storeId)->getSource()->getAllOptions(false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement