·

Magento

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

Can’t remove images from the admin in Magento?

Today I stumbled upon an issue in Magento which I couldn’t wrap my head around: In the backend I checked an image to be removed from the media gallery, but upon saving, nothing happened. Magento didn’t show a message and my logs were empty. After a while of looking what was going wrong, I finally read further ...

How to add custom properties to magento attributes

A while ago I wrote an answer on stack overflow regarding the question “How to add custom property to Magento attributes and display it on the front end”. The question was simple: I would like to add a text description on the properties’ tab and display it on the front end. I happened to have read further ...

Save an EAV attribute in Magento without touching the model

If you have a batch operation for thousands of products, categories, customers or any other Magento entity that uses Magentos’ EAV-structure, speed and memory usage are important factors to consider. Especially when you only need to change one or two attributes of a product or category there’s no point in loading the entire model for read further ...

The difference between a MAGE_RUN_TYPE website and store in Magento

So the other day I spent almost a day wrapping my head around a problem I ran into when I was trying to deploy a multistore- Magento site. The problem was that whatever I tried, the site kept showing the default Magento 404-page (not the sites’ one). I tried everything: Flushing all caches (local, memcache, read further ...

Get Magento category URL without loading category

If you want to get the URL of Magento without actually loading the model, you can use Magento’s core URL rewrite functionality to fetch the URL without all too much load on the database like this: I had to use this nifty trick once when I had to load a category tree that consisted read further ...

How to add complex joins to your collection in Magento

I recently had the situation where I had to add a really complex field to a product collection in Magento. The client had a very special way of calculating product prices that depended on: The supplier that delivered the product the cheapest (a product could have more than one supplier). The customer that was logged read further ...

Make better use of Magento’s cache

Magento has it’s built-in caching mechanism, but unfortunately it’s not used very often (or by default). This is good to know when you are creating a module with your own custom block templates. When you know what you are doing, the speed benefits can be pretty impressive!read further ...

Create a (MySQL) SSH tunnel from within Vagrant

Let’s say you have the scenario where you need to connect to a remote (MySQL) database. If you have SSH access to the server you can simply create a SSH tunnel and forward the MySQL  port from the remote machine to a port on your local machine. For example: But what if you need to do this in read further ...

Set the order status for new orders in Magento

In Magento, for most payment methods, you can assign an order status to a new order. You can do this in the system configuration for the specific payment method. But in a lot of cases, the only order status you can select here, is ‘Pending’.   But what if you want to assign a different order read further ...

1 2 3 4 5 6