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 186 of 186« First...160170180«182183184185186