·

How to

Tips & tricks, tricks & tips. Looking for a way to achieve something? Here’s how to do it!

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 ...

Change Magento configuration on the fly

Sometimes you have a situation where you need to change the configuration of Magento on the fly. Just for your single request, without saving it. This can be easily done with the Magento configuration Model: If you want to change a configuration value on the fly on store-level, you can do this as follows: read further ...

How to keep the fun in webdevelopment

As a programmer, your work can become a bit… boring sometimes. If you think you’ve lost al fun in your job as a webdeveloper, than read this post on how to turn that frown upside down.read further ...

Prevent the generic ‘Killed’ error in your PHP script

I recently found myself in a task where I had to process 500.000+ rows from a database, each with a while set of columns. The first thing I tried to do was fetch it all in a single query and have PDO sent me a result. My server didn’t like this very much and gave read further ...

Create an install- or upgrade script in Magento that creates a static block

Ever been in the situation where your next update for your clients’ Magento installation requires adding a new static block? Don’t feel like logging in on the live site and doing it manually? Just add this little code snippet in your setup- or update-script to create that static block on the fly: The only read further ...

Improve your workflow with Spotlight and Flashlight

I’m a huge fan of Alfred, but since the recent Yosemite update, Spotlight might just going to change that. You see, the new design and features of Spotlight are already great, but Alfred still proved more functionality, especially with the Power Pack feature to create your own workflows. But when you combine Spotlight with a read further ...

PHP as a CLI language

Some of you might already know this, but I use PHP as a CLI language quite often. And why not? It’s PHP, the language I know best. It has access to the file system so you can do all kind of magic with it. Like any shell script it’s great for maintenance, scaffolding or periodic read further ...

Converting multiple MySQL INSERTS into a single statement

So I had to import this huge MySQL database the other time and I had the problem that each INSERT -statement only contained 1 row of data. Now, for a small database this is not a big deal, but for a database that’s 1GB or more importing all these separate rows takes forever! So i had read further ...

1 7 8 9 10