Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento category link to 404 error
    primarykey
    data
    text
    <p>this is my first Magento project and I've run into such a big issue. The Magento version I'm using is 1.7.0.2 I managed to create a custom left bar navigation bar using the following code in my "app/design/frontend/default/default/template/catalog/navigation/category.phtml"</p> <pre><code>&lt;?php $cats = Mage::getModel('catalog/category')-&gt;load(1)-&gt;getChildren(); $catIds = explode(',',$cats); ?&gt; &lt;div id="LeftCategory"&gt; &lt;h2&gt;Wicked Categories&lt;/h2&gt; &lt;hr style="color:white; height:1px; margin:5px;" /&gt; &lt;ul&gt; &lt;?php foreach($catIds as $catId): ?&gt; &lt;li class="Li-Top-Category"&gt; &lt;?php $category = Mage::getModel('catalog/category')-&gt;load($catId); ?&gt; &lt;a href="&lt;?php echo $category-&gt;getUrl()?&gt;"&gt; &lt;?php echo $category-&gt;getName()?&gt; &lt;/a&gt; &lt;?php $subCats = Mage::getModel('catalog/category')-&gt;load($category-&gt;getId())-&gt;getChildren(); $subCatIds = explode(',',$subCats); ?&gt; &lt;?php if(count($subCatIds) &gt; 1):?&gt; &lt;ul&gt; &lt;?php foreach($subCatIds as $subCat) :?&gt; &lt;li class="Li-Sub-Category"&gt; &lt;?php $subCategory = Mage::getModel('catalog/category')-&gt;load($subCat); ?&gt; &lt;a href="&lt;?php echo $subCategory-&gt;getUrl()?&gt;"&gt; &lt;?php echo $subCategory-&gt;getName()?&gt; &lt;/a&gt; &lt;?php ?&gt; &lt;/li&gt; &lt;?php endforeach;?&gt; &lt;/ul&gt; &lt;?php endif; ?&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>It does the work to generate the category navigation. But the issue is, the URL each link points to doesn't work. All links are invalid that lead to the 404 Error Page. You can see it here: <a href="http://wicked-shop.dev.thejinstudio.com/shop/catalog/category/view/s/accessories/id/15/" rel="nofollow">http://wicked-shop.dev.thejinstudio.com/shop/catalog/category/view/s/accessories/id/15/</a></p> <p>I've done so much search and nothing really solved this issue. I appreciate your help in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload