Adding a new tab under one page checkout – full working module

Share
Posted on February 23rd, 2011 | Posted by admin

Adding a new tab under one page checkout – full working module

Adding a new tab under onepage checkout in Magento might seem as incredibly easy task. right?! Well, it’s not. If you want to do it properly, you gonna have to do some work. Took me few hours to get this one running. Attached are screenshots for you to see final result.

Frontend

Backend1

Few words about module. It uses built in Admin theme module from a coworker Ivan Weiler. If you have this Admin theme module installer already please disable it, since its built into this Heared4us module. There is only one thing you NEED TO DO in order for module to work: Once you added it to Magento, go to System > COnfiguration > Design and write down “custom” under Admin theme section. This admin theme section will appear as soon as you refresh Admin page once you copy-pasted module. If you get “Access denie” error, please logout and login into the admin.

Getting started with building Admin module in Magento

Share
Posted on February 23rd, 2011 | Posted by admin

Getting started with building Admin module in Magento

Due to the “complexity” of Magento’s xml files, developers can waste great amount of time on “unnecessary” things.
When I say “complexity” I say it with purpose. XML files are not so complex by them selves, but due to extreme lack of documentation and changes Magento pumps in every new “major” release, people are lost among things that should really be sideways. Anyway, in this little article I will show you how to create basic, startup structure for your module to get it shown under Magento Admin main top menu.

As you can see on the picture below, I am creating a menu item with title “ActiveCodeline_SampleModule1″.

Bestseller module (with Toolbar!) – Magento 1.2.1

Share
Posted on February 23rd, 2011 | Posted by admin

How many people were disappointed to install Magento’s test data and find out that the home page “Best sellers” was just pain HTML placed into the CMS home page? I certainly was one of those people. That’s why I decided to create a Bestseller Module that was dynamic and harnessed the power of Magento’s built in features. This post shows you the code and gives and explanation of what is happening.

For those of you impatient to get to the code, here it is:

01.<?php
02.//bestseller module - grabs from all products, returns in order of total quantity ordered
03.class Mage_Catalog_Block_Product_Bestseller extends Mage_Catalog_Block_Product_Abstract {
04.
05./**************************************************************************
06.Override _preparyLayout() method found in Mage_Core_Block_Abstract
07.Retrieve sold products collection, prepare toolbar
08.
09.@Return Mage_Catalog_Block_Product_Bestseller

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 3 of 3«123