Simple Magento Deployment Script

Here is a quick bash script I created to do a magento deployment. This assumes your magento code is managed by git and you have n98-magerun v1.100 or greater installed on the server. Run this in your project root like “bash mybranchname;” .

echo "fetching new branches";
git fetch;
echo "creating maintenance file";
touch maintenance.flag;
echo "checking out" $1;
git checkout $1;
echo "clearing cache";
n98-magerun cache:flush;
echo "clearing JS and CSS cache";
n98-magerun media:cache:jscss:clear;
echo "running installers";
n98-magerun sys:setup:run;
echo "removing maintenance file";
rm maintenance.flag;
echo "done";

Magento dataflow import Skip import row, is not valid value “” for field “type”

I’ve run into this issue multiple times for various reasons when using Magento’s dataflow importer. In my research of the problem I came across that contained many helpful suggestions, but none of those solved the issue. Just a few products were causing this issue during the import on my dev environment. I found out the product did not exist in my older copy of the database, which caused this error. So much for having a meaningful error message :).

Enable template path hints in Magento admin

Newer Magento versions including Community 1.9 and higher, add the following in a config.xml of an active module:


For older installs insert this record into the database and delete when finished:

INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('websites', '0', 'dev/debug/template_hints', '1');

What is the standard Magento order status flow?

order submitted, status is set as pending and payment is authorized
order invoiced, status is set as processing and payment is captured
order shipped, status is set as complete and payment is still captured

Some stores will vary slightly on the first order status depending on what they have specified in their payment method as the default status for a new order. If the desired status is not available to the payment method, you’ll need to assign the status (generally pending or processing) to the state (processing).

Why does Magento block cache become invalidated frequently?

In Magento, whenever you make changes to products, static blocks, etc, it recognizes that the data in the database is no longer the same as what it has in the cache. Unfortunately, Magento doesn’t realize what cache data is different, just that something is different. There are many reasons a block cache is invalidated from updates to products, catalog price rule changes, and 3rd party extensions. Also running of cron jobs can cause block caches to become invalidated as well. You will need to go into System > Cache Management and refresh the invalidated cache types.