Magento Get product description from product Id

Magento: Get the product description in catalog/category list page


/**
* Get the resource model
*/
$resource = Mage::getSingleton('core/resource');

/**
* Retrieve the read connection
*/
$readConnection = $resource->getConnection('core_read');

/**
* Retrieve our table name
*/
$table   =   $resource->getTableName('catalog_product_entity_text');
$query  =   "SELECT value FROM {$table} WHERE entity_id = ". (int)$_product->getId();

//print_r(get_class_methods($readConnection));
/**
* Execute the query
*/
// $readConnection->query($query);
$results   =   $readConnection->fetchAll($query);

/* straight dump to screen without formatting */
//print_r($results);
$description = $results[0]['value'];
?>

Comments

Popular posts from this blog

AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes

Create Virtual Host in IIS Server

The model type is invalid. please select an item from the list ( ASP.Net MVC)