Get the category name, image, description from category id in magento

 $category = Mage::getModel('catalog/category')->load(category_id);
echo $category->getName();
echo $category->getImageUrl();
echo $category->getDescription(); 

Note:- put the categoryid in the load function.

  • Afzal Khan

    Hello there..!

    I’m looking for a query which has a LIKE clause
    eg. select name , image , description from table where name like $name;
    this is mysql query which has a php variable

    $sql=”SELECT p.`entity_id`, pv.`value` as name, pt.`value` as description, GROUP_CONCAT(DISTINCT(cp.`category_id`) SEPARATOR ‘, ‘) as categories, GROUP_CONCAT(DISTINCT(pm.`value`) SEPARATOR ‘, ‘) as imagesPath
    FROM `catalog_product_entity` as p
    INNER JOIN `catalog_product_entity_varchar` as pv on pv.`entity_id` = p.`entity_id` and pv.`attribute_id` = 71
    INNER JOIN `catalog_product_entity_text` as pt on pt.`entity_id` = p.`entity_id` and pt.`attribute_id` = 72
    INNER JOIN `catalog_category_product` as cp on cp.`product_id` = p.`entity_id`
    LEFT JOIN `catalog_product_entity_media_gallery` as pm on pm.`entity_id` = p.`entity_id` and pm.`attribute_id` = 88
    GROUP BY cp.`product_id`, pm.`entity_id`”;

    this is a magento query which fetch all the product name description and path of image and i’m trying to put a LIKE clause in this query but i can’t understand that where should i put a LIKE clause in this .
    would you please help me. THANKS