Skip to content

Instantly share code, notes, and snippets.

@jreinke
Created September 10, 2013 12:36
Show Gist options
  • Save jreinke/6508802 to your computer and use it in GitHub Desktop.
Save jreinke/6508802 to your computer and use it in GitHub Desktop.
Magento: get attribute id by code
<?php
$attributeId = Mage::getResourceModel('eav/entity_attribute')
->getIdByCode('catalog_product', 'color');
@ZaneCEO
Copy link

ZaneCEO commented Mar 1, 2018

Thanks man, just what I needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment