![]() |
PHP or Magento Experts ... Please Help? Hey guys, Basically I've got a vertical nav menu in a magento ecommerce site. The code below is displaying the vertical nav menu the sub-categories on the home page, but they're not hyperlinked (yet). PHP Code: it'll hyperlink the categories. Here's the "instructions" that were given... Quote:
Code: OK, seems as though the Warrior Forum wont allow me to show you the code... So if you could kindly check this site out, all the code is there. Magento Custom Category Listing Block | Devin R. Olsen Web Developer There's a youtuibe video there as well, but mentions nothing of the hyperlinking code. Now, Im not sure if this is enough info, but Im pretty sure a php expert could easily pick this up and whip their magic to give some much needed advice? Any assistance would be greatly appreciated, Thanks a bunch in advance, - aj |
Re: PHP or Magento Experts ... Please Help? I don't use Magento, but I believe you're looking for something like this: Now, for every occurrence of echo $category->getName(); use the code below: ?> <a href="<?php echo $category->getUrl()?>"> <?php echo $category->getName()?> </a> <?php For every occurrence of echo $subCategory->getName(); use this code: ?> <a href="<?php echo $subCategory->getUrl()?>"> <?php echo $subCategory->getName()?> </a> <?php Note: The author uses only the echo $category->getName(); to reference both the top and sub categories. That may be an oversight. Give that a try. |
Re: PHP or Magento Experts ... Please Help? Ray, You're a legend! Your solutions works ... but now magento is spitting out errors when clicking on the hyperlinks. Just wondering if this is the correct method? PHP Code: or have I inserted them wrong? Thank you so much for your help mate, |
Re: PHP or Magento Experts ... Please Help? Disregard Ray .... It was a magento issue. Thanks again for your assistance mate. Legend. - aj |
| All times are GMT -6. The time now is 09:39 PM. |