Hi All,
I am using addAttributeToFilter but it is retrieving the wrong result:
$collection->addAttributeToFilter(array(
array(
'attribute' => 'Author_first_name_1',
'like' => "%" .
trim(Mage::helper('catalogsearch')->getQuery()->getQueryText()) . "%",
),
array(
'attribute' => 'Author_surname_1',
'like' => "%" .
trim(Mage::helper('catalogsearch')->getQuery()->getQueryText()) . "%",
)
));
Here, I am trying to get the result whose first name or last name match with query string, but not getting the correct result. If I remove first name condition from here then it is working fine. Can any one help me?
Thanks in advanced Hiral