Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $attribute = $objectManager->create('MagentoEavModelConfig')->getAttribute('catalog_product', 'color');
  2. $colorAttributeId= $attribute->getAttributeId();
  3.  
  4. foreach ($attribute->getSource()->getAllOptions(true) as $option) {
  5. $colors[$option['value']] = strtolower($option['label']);
  6. }
  7.  
  8. print_r($colors);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement