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

Adding Links to Magento Menu Bar

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

Custom category menu navigation in Magento

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.

What’s in a block? – Some Magento “basics”

Share
Posted on February 21st, 2011 | Posted by admin

Many developers are familiar with the MVC (Model View Controller) design pattern that is seemingly ubiquitous throughout web frameworks. Looking through the code in Magento, however, we see many other components besides the M’s the V’s and the C’s.

Each module  (a “module” meaning the separate directories within the “app/code/core/Mage” directory that comprise of Magento’s different functional areas) contains the usual Controller and Model. You’ll see that within each module, there are no Views (more on this later). You’ll also see extra tidbits, such as “helper” , “etc” and “sql”. These are (and are not) standard within the Zend Framework context and will not be discussed in this article. In these modules are also the sort of files which we work with very often. The all powerful block! This article will attempt to (hopefully accurately) describe just what a Block is and how it’s used.

Page 95 of 95« First...708090«9192939495