kaylamatthews Posted May 4, 2011 Share Posted May 4, 2011 I got to this and it’s bringing up the getName but the getUrl() isn’t returning any URL at all.... <?php $children = Mage::getModel('catalog/category')->getCategories(3); foreach ($children as $category): echo '<li><a href="' . $category->getUrl() . '">' . $category->getName() . '</a></li>'; endforeach; ?> The output code is just <li><a href="">name of sub-cat</a></li> Anybody have any ideas Please? I have been trying to figure this out for over 5 hours to no avail Thanks in advance! Kayla Quote Link to comment Share on other sites More sharing options...
Web Developer Posted May 11, 2011 Share Posted May 11, 2011 echo '<li><a href="' . $category->getUrl() . '">' . $category->getName() . '</a></li>'; in this line use "children" instead of "category"(at both the positions) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.