Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 3347

It should be used for questions regarding the catalog module.

3 votes
3 answers
21k views

How to get category name and url on product template?

I need to display current category and url template file: catalog/product/view.phtml I have tried the following: $categories = $_product->getCategoryIds(); foreach($categories as $categoryId){ $ … _category = Mage::getModel('catalog/category')->load($categoryId); echo $_category->getName(); if($_category->getIsActive()){ echo "yes\n"; } } above code works, but it outputs all …
Vlad Vinnikov's user avatar
4 votes
Accepted

How to get category name and url on product template?

$categories = $_product->getCategoryIds(); foreach($categories as $categoryId){ $_category = Mage::getModel('catalog/category')->load($categoryId); $categoryData = $_category->getData(); if …
Vlad Vinnikov's user avatar