In my project trying to pull product from selected category which have a specific attribute value.
$currentCategory = Mage::getModel('catalog/layer')->getCurrentCategory();
$products = Mage::getModel('catalog/product')
->getCollection()
//->addFieldToFilter(???????) //category id ????
->addAttributeToSelect('name','price','special_price')
->addAttributeToSelect('showme',array('eq' => 'Yes'))
->load();
or within whole categories tree (I mean category and its childrens)
I stuck and don't really have an idea.
How to achieve it ?
Then check if there is more than one then pick the first one and "show".
EDIT:
I just forgotten to add: two parameters must be checked, "if showme and category" then show :)