I've a requirement to show attribute labels in URL to filter products. I'm able to generate Url with attribute labels. Now all I've to do is convert attribute label to attribute id/value (ex: 1,2), so that code behind the scene works as it is (based on attribute value/id).
apply() function of
app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php I'm getting attribute label in
$filter = $request->getParam($this->_requestVar); (ex: Blue).
How I can convert this attribute label to attribute id (say for green it's 2), so that I can pass it to
$this->_getResource()->applyFilterToCollection($this, $filter); and backend functionality will work as it is?
$filter->getValue() but it doesn't work.
Is it possible to get attribute value/id from attribute label?