Codegento Who Let Mage Out Of The Cage?

28Mar/1113

Debugging Magento Step by Step

Posted by Ben Robie

Although these debugging tips can be applied towards any LAMP application (for the most part), we wanted to give a more narrowly focused step by step debugging checklist for Magento. Get XDebug or ZendDebugger Working I, personally, don’t know how anyone can develop effectively outside of an IDE (mine being Eclipse PDT), or without a [...]

Read More...
26Mar/1123

How Blocks And PHTML Work Together

Posted by Ben Robie

Early on in my Magento-coding days, I struggled with the relationship between the block classes and the phtml files. Which came first? Who owned who? Do you need blocks? Do you need phtml? First and foremost, we need to understand that the complexity of the layout/block/phtml relationship is necessary, powerful, and flexible. Those three pieces [...]

Read More...
15Mar/119

Joining An EAV Table (With Attributes) To A Flat Table

Posted by Ben Robie

If you have created a “custom” flat table that has a foreign key to an existing Magento EAV table, you might come across the need to join the two together. If you main table is the flat table, you will find it difficult to join the two using existing Magento code. Below is a snippet [...]

Read More...
15Mar/110

Debugging Translations

Posted by Ben Robie

When your store is dealing with multiple translations, sometimes you just want to see a list of which translations are coming from what modules. Magento doesn’t offer a way to get this information without editing the core, so what I am about to do should only be done for debugging and then removed. First, located: [...]

Read More...
14Mar/114

Debugging “HEADERS ALREADY SENT” error

Posted by Trent Ohannessian

Sometimes Magento throws the “HEADERS ALREADY SENT” error to the system.log and it can be quite frustrating determining where headers were already sent. ¬†Especially when working on a shared codebase and you’re pretty sure that you and your team haven’t done anything to cause this new error. ¬†All you normally get in the system.log file [...]

Read More...
12Mar/114

Rewriting Or Rerouting A Controller

Posted by Ben Robie

Just as with models/blocks/helpers, there are times when we want to change the way a core Magento controller works. Since we DON’T EVER WANT TO CHANGE THE CORE, we need a way to tell a request to use OUR controller instead of Magento’s controller. We do this by changing the configurations that hold the routing [...]

Read More...
12Mar/110

Rewriting a Helper Class

Posted by Ben Robie

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. And since we have already talked about rewriting models and blocks, lets talk about helpers! For a third time, I will state that you SHOULD NEVER CHANGE THE CORE, [...]

Read More...
11Mar/1121

Creating Custom Magento Reports

Posted by Ben Robie

This post is going to be LONG. And not fun. To be honest, I’m not sure how some of this stuff works, but I do know that I have successfully created two different kinds of reports. Some things to note: You should never create reports off of a transactional table. Running the report could potentially [...]

Read More...
6Mar/1112

Magento Examples, Blogs, and Tutorials

Posted by Ben Robie

Magento tutorials are lacking, as are Magento examples and Magento blogs. This being the case, we started this site to help any/all Magento developers to be more proficient in Magento coding, we wanted to put out a brief list of sites that offer the same type of help. Quite obviously, the best is CodeMagento.com, but [...]

Read More...
6Mar/113

The “Model” Family

Posted by Ben Robie

With any framework that follows MVC, you should find a place where models are defined, along with some form of the “resource model”. In Magento, you will find three members of the “model” family. The Model, the Resource Model, and the Collection Model. All three members of the family work together to get us the [...]

Read More...