phpmagento

Magento get attribute code from filter.phtml


I am trying to get the attribute code from the filter.phtml template file. Does anyone have any ideas how to do this?


Solution

  • $_item->getFilter()->getAttributeModel()->getAttributeCode()

    The above line of code can be used to get the attribute code when it is in the loop.