How to display category name by product id in Magento
If you want to get Category Name by Product Id in Magento. Use following code:
<?php
$product = Mage::getModel('catalog/product')->load($_product->getId());
$cat_id = $product->getCategoryIds();
foreach($cat_id as $categorycbId) {
$category_id = Mage::getModel('catalog/category')->load($categorycbId);
echo $category_id->getName();
}
?>
Its really glad to know about how to display category name by product id in magento. Thanks for posting these kind of posts, keep updating.
ReplyDeletegemstone store in lajpat nagar
Its really very informative post about display category name. Glad to know about it, very innovative post, keep posting.
ReplyDeleteColor Coated Profile Sheets In Haryana : VIMP
Very informative post and pretty well maintained, this post is very important for the Magento Developer. Thanks for posting and keep updating your post.
ReplyDeletevitamin c gel face wash
Its a really nice post, thanks for it and keep updating.
ReplyDeleteomega 3 fatty acids capsules
Really impressive post and keep updating.
ReplyDeleteBuy colombian emerald online
its quiet impressive.
ReplyDeletehoverboard maintenance