Skip to content

Instantly share code, notes, and snippets.

@yevgenko
Created April 17, 2010 02:42
Show Gist options
  • Save yevgenko/369209 to your computer and use it in GitHub Desktop.
Save yevgenko/369209 to your computer and use it in GitHub Desktop.
script to override email templates in Magento
#!/bin/sh
phone='(XXX) XXX-XXXX'
email='[email protected]'
basedir='app/design/frontend/tjuInterface/default'
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/alt="Magento"/alt="{{var order.getStoreGroupName()}}"/g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/Magento Demo Store/{{var order.getStoreGroupName()}} /g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i 's/Demo Store/{{var order.getStoreGroupName()}} /g' '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i "s/mailto:[email protected]/mailto:$email/g" '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i "s/[email protected]/$email/g" '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i 's/alt="Magento"/alt="{{var customer.store.name}}"/g' '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i 's/Magento Demo Store/{{var customer.store.name}} /g' '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i 's/Demo Store/{{var customer.store.name}} /g' '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i "s/mailto:[email protected]/mailto:$email/g" '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i "s/[email protected]/$email/g" '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i "s/(555) 555-0123/$phone/g" '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment