Top 3 Solutions when your Magento Categories are not displaying

Share
Posted on February 22nd, 2011 | Posted by admin

Here are 3 quick solutions to try if you do not see your Magento store categories after a fresh install of Magento or an upgrade to the latest version. I wanted to post this because I just recently helped install Magento for someone and experienced this. The installation version was the latest Magento version, 1.2.1.2 and product categories did not show up on the frontend after they were added in the administration interface.

The top 3 solutions to this in my experience are:

  1. The categories not added as sub-categories of the Default, Root category.
  2. The Magento store configuration has no default category set.
  3. The category cache requires a refresh.

Custom Category Images Listing Block Tutorial

Share
Posted on February 22nd, 2011 | Posted by admin

Recently, I just finished coding out a website for a client in Magento. You can view the site at www.3graces.com, it was a full switch from some old legacy asp shopping cart to Magento. Im really happy with the way things turned out and the client is too, Magento just has so many wonderful features built-in.

One feature that I found wasn’t built in was a way to display each sub-category with an image, and its name on a landing page. Magento has a nice feature which allows you to assign an image to a category, but doesnt give you a way to make that show up in a listing somewhere.

I setup 6 main categories, with each having multiple sub-categories and I wanted to have a way to show all those sub-categories to the user on a nice page that was pleasing to the eye. Here is an example: Payot Paris by Category.

Adding Links to Magento Menu Bar

Share
Posted on February 22nd, 2011 | Posted by admin

Look for the top.phtml corresponding to your menu.

You can find the top.phtml files using SSH shell with this command.

Come to the app/ folder
find -name top.phtml

./design/frontend/default/iphone/template/catalog/navigation/top.phtml
./design/frontend/default/default/template/catalog/navigation/top.phtml
./design/frontend/default/blank/template/catalog/navigation/top.phtml
./design/frontend/default/modern/template/catalog/navigation/top.phtml

From above you should be able to locate your themes top.phtml

Custom category menu navigation in Magento

Share
Posted on February 22nd, 2011 | Posted by admin

Just some code for custom category menu navigation. I’m a bit short on time so, no fancy walk trough. All you need to make this show on your page is to call it inside layout file like

<block type=”core/template” template=”surgeworks/customcatnav.php” />

Filename: customcatnav.php.

01.<?php
02.//Get store id
03.$storeId = Mage::app()->getStore()->getId();
04.
05.//Get category model
06.$_category = Mage::getModel(’catalog/category’)->setStoreId($storeId);
07.
08.$_categoryCollection = $_category->getCollection();
09.$_categoryCollectionIds = $_categoryCollection->getAllIds();
10.
11.//Remove root category from array
12.unset($_categoryCollectionIds[0], $_categoryCollectionIds[1]);
13.

Magento Menu Customization with Product List

Share
Posted on February 22nd, 2011 | Posted by admin

Root Category → Category → Sub-Category

We will customise the menu to show the Products of a category/su-bcategory along with its hierarchy in dropdown menu as seen below.

This is a good feature if you have less products in a website.

In order to implement the above structure, we need to modify the navigation.php file of drawItem() function like below. The navigation.php is available in the following location,