So this gave me a little bit of trouble because it didn’t work the way I expected it.

I was expecting this to work, but it doesn’t.. Well, it does set something, but the value does not change in the admin part of Magento..

So then I stumbled upon this little piece of script on someone else’s blog which was dealing with an import as well. This also seems like a more efficient way of updating many different attributes for many products at the same time!

For starters: forget about github. Eventhough that’s usually the place I end up for the latest & greatest version of packages it is not the place to find documentation for Openstack related projects. The official documentation can be found here: http://docs.openstack.org/user-guide/content/install_clients.html

No for a quick rehash.

For OSX Heat client just run:

Under Unbuntu/Debian run:

Turns out Magento has a tendency to remember if you selected Show All on a list page for all subsequently visited list pages. This is not something we wanted. Turns out you can disable this functionality by disabling a single line of code.

You will probably want to override Mage_Catalog_Block_Product_List_Toolbar with your own module. In our case Amasty_Shopby_Block_Catalog_Product_List_Toolbar had already done that so I added it there.

This little tutorial will explain how to get Redis higher than 2.6 in Centos. I ran into the problem that CentOS only had version 2.4 in the normal repositories and it turned out Magento requires a Redis version higher than 2.6. The REMI repository has version 2.8 though, and it’s fairly easy to install that version.

To install the REMI repository check the following page first:
http://blog.famillecollet.com/pages/Config-en

UPDATE:
Then to quickly install the redis package without editing any repo files just use this command:

And skip all this:

To enable it you have to edit /etc/yum.repos.d/remi.repo and enable it:

Then you can install the updated redis version. You can optionally also disable the repo afterwards again just to make sure you don’t end up involuntarily updating many other packages (if you don’t want to..)

So I just spent the greater part of the evening fixing a problem with a client’s Magento installation which was causing deadlocks during checkout. We tried everything from reimporting a database dump to another mysql version, an upgrade to percona and even a whole other cloud server.

We focused on the database because of the deadlock and also saw a lock on a stock table.

Eventually it turned out to be the PageCache module. Even after disabling it in etc/modules was it still active. Only by disabling it via amin did it really turn off and all the deadlock problems disappeared…

I am seriously starting to dislike varnish,
this is not the first time we have had problems with it in combination with Magento.

UPDATE: Look into HHVM in combination with LestiFPC if you crave speed!

Here are two very handy functions which you can use to create upsells. You call insertUpsells with an array of product_ids and it will make sure all those products are upsells of each other. Just noticed the count could have been done a bit cleaner but it works..

Seems there’s still a lot of traffic coming to this old page, so I decided to re-add it. It’s from 2009. I had to fix the URL because I am not using that specific permalink structure anymore. I’m using an Nginx rewrite to forward to this new URL now.

Mind you I wrote this for ZF 1.x, I have no idea if this still works for 2.x but considering the amount of traffic it generates it could still work. If it DOES work, please leave a comment stating so 🙂

The post:
The trick with cronjobs is that you do not want to load the whole View part of ZF, we don’t need any kind of HTML output! To get this to work, I defined a new constant in the cronjob.php which I will check for in the index.php.

Your cronjob.php could look something like this:

And you’re have to change the index.php:

It’s as easy as that!
You’d be surprised how long it took me to find the answer to this simple problem, like many other opensource projects documentation for ZF has to sometimes be found in the community and a lot of that is outdated. This was just one of a few solutions but it works just fine for me and is pretty simple to implement so I decided to stick with this.

I hope this can help someone out

You can quickly delete all Magento products using this collection of queries.
UPDATE: Added removal of reviews & ratings!

This works for me under 1.8.1.0: