Functions in Blocks and in Helpers: what’s the difference?

For me, it’s pretty clear when the difference between a Block and a Model. Basically, the Model defines and implements our «object» in the Magento system, so we can call it whenever we need it. Blocks let us run specific functions from a concrete part of the website (defined in the layout) and call them from the phtml files that have been loaded from the page layout using a block. But imagine that you haven’t Read more…

How to get and show customer reward points in Magento Enterprise

One of the cool features in Magento Enterprise Edition is the reward points system. It’s very simple to configure and a really good way to make the customer feel «rewarded» for each action that he/she performs on the web. The reward points are shown by default in «My account» area and also in the checkout process. If we need to show the reward points in any other place on the web, we need to call Read more…

The easiest way to use jQuery in Magento

There are many different ways to use jQuery in Magento. The point on this is that given that Magento uses Prototype as default javascript framework (arghhh!), if we try to use jQuery libraries directly, there is going to be a «conflict». We can solve this activating the jQuery «no conflicts mode», but there are easier ways. The easiest I’ve found is to install the following extension: Mxperts jQuery Base After installing it, you can use Read more…

Get and show the collection SQL query on Magento

I’ve been “suffering” out of memory problems on one of our clients magento installations. The version is the 1.4.0.1, and it seems that the queries are not as efficient as they are on Magento 1.5 and above. So I needed to find out what were exactly the SQL queries that produced that out of memory error. The most difficult thing is to find where the collection query is done. Maybe there is a base collection Read more…

Solving the 404 error on the System » Configuration custom extension menu

When we install for the first time an extension that adds a menu on the System » Configuration panel, it is possible that we receive a 404 error when trying to configure it. This has happened to me on the Simple Configurable Products extension and the AheadWorks Blog extension. Solving this is really easy: 1. Clean your cache and reindex data 2. Log out from the backoffice and log in again Everything should work fine Read more…

Solving the “Customer Login” title in all pages in Magento

I’m one of those that wanted to add a login form on the sidebar of my Magento. This was really easy, I just add the following line to But after that, every page on my magento store showed the title page as “Customer Login”. This happened to me in Magento EE 1.10 and Magento CE 1.6. Solving this is really easy, if you know how. Just copy the app/code/core/Mage/Customer/Form/Login.php file in a new folder into Read more…

Remove the from_store link when changing store views/languages in Magento

By default, on the store views list (usually for languages), Magento creates links to the different views but it also adds the “from_store” parameter. It seems that SEO guys don’t like this too much. If you need to remove it, search on your theme templates for the “select_language” string. Usually, this is on the header.phtml, but depending on the theme, it can be placed in other places. So you can look for it using grep: Read more…

Migrating Magento from Community to Enterprise Edition

One of my first tasks on my new job is to migrate a Magento Community Edition to the Enterprise one. There is no too much information on the Internet about how to proceed with this kind of task. That’s the reason I write this post. First step: moving the old database The first thing we have to do is to create a backup of our magento community database and create a new database (for example, Read more…