Archive by Author

How to override a Magento core block class

Posted on 17. Sep, 2008 by Fido .

This tutorial will show you the proper method for overriding a Mage core class. This will work for Block and Model classes. Controllers are a slightly different story and for another tutorial.

Some discussion on breadcrumbs: I will be overriding the Core file: app/code/core/Mage/Catalog/Block/Breadcrumbs.php (which I will call [Breadcrumbs-B]). This file is not to be confused with the block: app/code/core/Mage/Page/Block/Html/Breadcrumbs.php (which I will call [Breadcrumbs-A]).

Continue Reading

Fix add to cart (redirect to homepage) bug

Posted on 12. Sep, 2008 by Fido .

Some people have run into a bug (apparently since version 1.1.3) where (not matter the settings in the backend) the users were getting redirected to the home page after they added a product to the cart.

Naturally this won’t be what most people want. (There is the option in the backend to set “After adding a product redirect to shopping cart” to ‘Yes’ or ‘No’ but this bug is ignoring this).

Continue Reading

Create a simple custom module

Posted on 11. Sep, 2008 by Fido .

Part of customizing Magento is, of course, creating custom Modules. These allow you to inject functionality anywhere, whether in a “static” block fashion that’s more than static, or a shipping/payment module, or large module to do something as large as integrating a 3rd party system (or multiple systems).

There are many things custom Modules can do, from editing your Database, to handling module upgrades to overriding classes (Blocks, Controllers, Models) … and more!

Continue Reading

How to fix the Magento Out of stock bug, version 1.1.x

Posted on 05. Sep, 2008 by Fido .

This is a popular bug that has been plaguing many people with their custom Magento solutions.

Problem: Magento shows products that are in stock as “Out of Stock” – It seems to be popularly reported within the New Product block.

Continue Reading

Editing the Magento Navigation

Posted on 04. Sep, 2008 by Fido .

This is not a comprehensive example (I didn’t write out an example of editing the navigation myself … yet) – but I will point out where the files are that you need to edit the top and left navigation.

Continue Reading

Quick debugging tip

Posted on 03. Sep, 2008 by Fido .

You can add items to magento’s system log and exception log in your code. This is very handy for pin-pointing coding errors / problems. Developing for Magento is often hard, especially since it’s not always possibly to have error reporting on (and even when it is on, its hard to find exactly what’s wrong!).
Here’s an [...]

Continue Reading

Magento Admin area charts powered by Google Charts

Posted on 03. Sep, 2008 by Fido .

Just an interesting note:

The charts that you see on the dashboard in the Magento Admin area are powered by Google’s Chart API.

Continue Reading

Moving / Removing Callouts on the left / right columns

Posted on 03. Sep, 2008 by Fido .

I recently answered a question on the magento forums about how to remove the callout images in the right / left columns.

This is a pretty easy task, but finding them required a small bit of digging (as usual).

Continue Reading

Editing the Footer in a stock magento build

Posted on 02. Sep, 2008 by Fido .

The items in the footer area are in two different locations. One part is a static block created within the magento admin area (CMS > Static Block). The other part is held in the related .phtml / .php / .xml files within the design files.

First off, the XML files…

Continue Reading

Using PHP code on a CMS page (custom Block/module)

Posted on 02. Sep, 2008 by Fido .

If you have ever wanted to do some sort of PHP processing within a CMS page that you created, here is how you do it.
A limitation of this tutorials is form processing. That involves creating and/or extending and/or overriding a controller class (which I’ll save for another day).
This code will allow your code to accept arguments, making it handy for some sort of dynamic use!

Continue Reading