Codegento Who Let Mage Out Of The Cage?

27Feb/114

Install Scripts and Upgrade Scripts

Posted by Soumya Shetty

Install scripts are a way provided by Magento to systematically track and version database changes. The changes can vary from schema changes like adding and dropping of tables, columns and even data. It is a good practice to write install scripts for any database changes made by your application. In this article i will talk [...]

Read More...
23Feb/110

Writing a PHPUnit Test Against Magento

Posted by Jason Evans

We write PHPUnit tests for all the Models, Blocks and Helpers we write. The primary benefit of doing this is to prove a method works as expected.  This allows us to refactor code and prove the method still works as expected (i.e. regression test).  Another benefit is being able to run a full automated regression [...]

Read More...
22Feb/1136

Grids and Forms in the Admin Panel

Posted by Ben Robie

In my humble opinion, creating new sections in the Admin Panel are a tad bit more complicated than creating new features on the frontend. Hopefully, this post will help get you a few steps closer to being able to understand and create adminhtml grids and forms. The first thing you need to do is create [...]

Read More...
Tagged as: 36 Comments
22Feb/1141

Adding a New Admin Menu Item

Posted by Ben Robie

If you create a new extension for Magento, chances are that you will need something in the Admin Panel to manage your data. Sometimes, this can be managed from the System > Configuration section, but other times, and new section is needed. In this short post we will give an example of what is needed [...]

Read More...
Tagged as: 41 Comments
21Feb/1116

Creating a New Magento Module

Posted by Ben Robie

Magento is a built on top of the Zend Framework. The Zend Framework supports modularizing your application, and Magento went the way of the module as part of it’s core design. In this short article, I will explain how to create a new module manually, and how to use the Module Creator to help you [...]

Read More...
21Feb/112

Rewriting a Block Class

Posted by Ben Robie

As stated in the blog post about rewriting models, the ability to rewrite classes are a super valuable tool when you want to extend the business logic of Magento, or make tweaks to the core. Again, I will state that you SHOULD NEVER CHANGE THE CORE, and if you can help it, you shouldn’t just [...]

Read More...
Tagged as: , 2 Comments
21Feb/1112

Rewriting a Model Class

Posted by Ben Robie

One of the best ways to extend the capabilities of the Magneto core is to “rewrite” their classes. If create a new instance of a model class the way you are supposed to (Mage::getModel(‘awesome/example)), Magento has built in a handy way of being able to “rewrite” your request from model A to model B. Let’s [...]

Read More...
Tagged as: , 12 Comments
20Feb/112

Customizing the Admin Theme

Posted by Ben Robie

Just as you want to customize the frontend in Magento, there are times when you need/want to tweek the admin panel screens to suit your business needs. Most people would probably just change the files under the adminhtml/default/default folder, but this is no bueno when doing upgrades. The easiest way to manage your adminhtml changes [...]

Read More...
Tagged as: , 2 Comments
20Feb/115

Altering the Database Via Setup Scripts

Posted by Ben Robie

A very difficult part of maintaining an application is managing the database changes. Some of the more modern frameworks offer a way to automatically handle schema and data changes within the application. Magento is one of these frameworks. Many developers are used to adding columns or rows to tables and then 2 weeks later forgetting [...]

Read More...
Filed under: Database, Magento 5 Comments
20Feb/110

Creating A Controller

Posted by Ben Robie

Ah, the C in MVC. Besides the index.php where all requests originate, the first point of contact into your application is the controller. Magento controllers are no different. A controller class is the class that contains action functions that know how to deal with each specific request. Most of the time, you will want to [...]

Read More...