Skip to content

Instantly share code, notes, and snippets.

@yevgenko
Created April 17, 2010 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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='example@example.com'
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:magento@varien.com/mailto:$email/g" '{}' \;
find $basedir/locale/en_US/template/email/sales -type f -exec sed -i "s/dummyemail@magentocommerce.com/$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:magento@varien.com/mailto:$email/g" '{}' \;
find $basedir/locale/en_US/template/email -type f -exec sed -i "s/dummyemail@magentocommerce.com/$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