Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $name='color';
- $attributeInfo = Mage::getResourceModel('eav/entity_attribute_collection')->setCodeFilter($name)->getFirstItem();
- $attributeId = $attributeInfo->getAttributeId();
- $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
- $attributeOptions = $attribute ->getSource()->getAllOptions(false);
- (
- [0] => Array
- (
- [value] => 6
- [label] => blueAdmin
- )
- [1] => Array
- (
- [value] => 5
- [label] => coralAdmin
- )
- [2] => Array
- (
- [value] => 3
- [label] => redAdmin
- )
- [3] => Array
- (
- [value] => 4
- [label] => limeAdmin
- )
- )
- $attributeOptions = $attribute->setStoreId(1)->getSource()->getAllOptions(false);
- Mage::app()->getStore()->getId();
- $storeId = Mage::app()->getStore()->getId();
- $attributeOptions = $attribute->setStoreId($storeId)->getSource()->getAllOptions(false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement