Skip to content

Instantly share code, notes, and snippets.

View adrian-green's full-sized avatar

Adrian Green adrian-green

View GitHub Profile
#!/bin/bash
function switch_files {
mv $1.png $1.tmp.png
mv $1-inverse.png $1.png
mv $1.tmp.png $1-inverse.png
mv $1@2x.png $1@2x.tmp.png
mv $1-inverse@2x.png $1@2x.png
mv $1@2x.tmp.png $1-inverse@2x.png
}
@adrian-green
adrian-green / Events fired during order submit process
Last active April 29, 2016 15:38
Main events fired during one-page checkout in Magento
### Events during order submit process
`core_copy_fieldset_customer_account_to_quote`
`core_copy_fieldset_sales_convert_quote_to_order`
`sales_convert_quote_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order`
`sales_convert_quote_address_to_order`
`core_copy_fieldset_sales_convert_quote_address_to_order_address`
`sales_convert_quote_address_to_order_address`

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

<?php
umask(0);
ini_set('memory_limit','512M');
set_time_limit(0);
if(file_exists('app/Mage.php')) require 'app/Mage.php';
else require '../../app/Mage.php';
// Init without cache so we get a fresh version
Mage::app('admin','store', array('global_ban_use_cache' => TRUE));