·

Magento

It’s one of the most used e-commerce solutions out there today. Here’s my 2 cents about it.

Magento’s Magical Getters and Setters demystified

For those of you who are already familiar with Magento 1 or 2, this article will tell you nothing new. For those who are new to Magento, this article is fundamental information for almost every class in Magento. If you are one of those pupils that are new to Magento, keep on reading… Getters and Setters read further ...

Events and Observers in Magento 2

Just like Magento 1, Magento 2 offers different ways to achieve your goal in your webshop. One of these things are all the events dispatched by Magento. So before you start rewriting models, overriding templates or adding new classes, chances are that you can get things done, just by listening what Magento has to offer. In read further ...

Find translateable strings in Magento PHP Files

So here’s a nice little one-liner you can use to find strings that require translation in your Magento projects. Just go to the folder of your theme or extension and execute the following command: What it does, it looks for occurances of __(‘ anything ‘)  in your code and creates a typical Magento CSV-translation string read further ...

Solving ‘Too late for the schedule’ with Magento crons

You’ve probably all encountered the ‘Too late for the schedule’-error in Magento at some point in your career as a Magento Developer: A cron is not working, and when you check the cron_schedule  table in your database, you see numerous records with this message. This error occurs when the Magento cron is trying to run a read further ...

Create an install- or upgrade script in Magento that creates a product attribute

When writing Magento Modules (or updating them), you’ll often find yourself in the situation where some of the functionality depends on the presence of a specific product attribute. As you know, you can use an installer script to create product attributes programmatically, just like you can create static blocks programmatically. Since I encounter this situation read further ...

Generating dummy products for unit tests in Magento

I already wrote a number of posts about unit testing in Magento, but as with everything in Magento, some things are tricky to do, especially when it comes to unit tests. So the other day I wrote a module that needed to do certain actions according to the value of some product attributes. Needless to read further ...

How to solve the ever-growing core_url_rewrite table in Magento

Got an ever-growing core_url_rewrite  table in Magento? Don’t know what’s going on? I encountered this problem today: when I re-indexed my catalog URL’s, for some reason Magento added some extra rows. And it would keep on doing this each time I re-indexed it, when no product were even added, deleted or even modified. This was read further ...

How to programmatically create URL Rewrites in Magento Community

I already covered this topic before for Magento Enterprise, but of course: there are cases you need to import 301 redirects into Magento Community at some point. Here’s how to do this:read further ...

How to use datalayer variables in Google Tag Manager

So today I was asked the question to add the transaction ID and order amount of a Magento order to some specific tracking pixel on the checkout page of Magento. However, the client already was using Google Tag Manager to put this pixel on the checkout page, and I already had a dataLayer present in Magento. read further ...

1 2 3 6