Refresh order grid table in Magento 1

Recently, we’ve faced a data inconsistency in the Magento sales_flat_order_grid db table. Some of the values in custom columns look like they were shifted. This issue may occur if the order grid has multiple custom fields and when a user archives orders in the Enterprise Edition.

Delete Magento product attribute values via shell script

Sometimes handling multiple store views/stores/websites within a single Magento installation may mess up attribute values on the different scope levels. We’ve recently faced similar problem with product prices. Some price values were changed on the scope level after data migration and it was almost impossible to detect and remove such values from the Magento admin panel. So we’ve decided to create a shell script for that purpose and share it with you.

Magento shell scripts

I have often seen custom shell scripts on Magento instances, be it a script testing out some code snippet or an attribute installation script which hadn’t made it’s way to a separate module. This will create a mess in the files structure as there are quite a lot files already residing in the root folder. There is, however, the dedicated place where these scripts should be placed and this place is the ‘shell’ folder in the root of every Magento installation