Magento - Observer Events

default adminhtml_controller_action_predispatch_start adminhtml_block_html_before

adminhtml_widget_grid_filter_collection adminhtml_cms_page_edit_tab_meta_prepare_form



adminhtml_cms_page_edit_tab_content_prepare_form api_user_html_before

adminhtml_widget_container_html_before permissions_user_html_before adminhtml_block_html_before

adminhtml_customer_orders_add_action_renderer adminhtml_catalog_category_tabs




adminhtml_catalog_category_edit_prepare_form adminhtml_catalog_product_grid_prepare_massaction

catalog_product_gallery_prepare_layout adminhtml_catalog_product_edit_prepare_form



adminhtml_catalog_product_attribute_set_toolbar_main_html_before adminhtml_product_attribute_types

Read more


Via terminal/command line $ ps auxf ( hit enter ) to see the postfix processes and sub-processes running, $ postqueue -p ( hit enter ) will print the queue. To see whats in the log file: cd /var/log and run a command like $ tail maillog To delete all old pending emails $ postsuper -d ALL deferred

Setting up PEAR and PHING on Mac with MAMP

From terminal: Install pear in home directory or cd ~ if unsure cd /Users/yourusername ( enter ) OR cd ~ ( enter ) To install/reinstall go to this site http://pear.php.net/go-pear.phar and then 'Save as...' and make sure you save this in your home directory Then in terminal run this command $ php go-pear.phar Now make a symbolic link so you can just type in pear at the command line prompt $ sudo ln /Users/yourusername/pear/bin/pear /usr/local/bin/ ( note you may not have /usr/local/bin....you may just have /usr/bin and thats ok use that location ) Next, run these tow commands in terminal $ echo ‘export

Read more

Xdebug and MAMP Pro

To add xdebug to mac using MAMP PRO, you have to do change permissions to a folder for it to copy the file: $ sudo chmod 777 /usr/lib/php/extensions/no-debug-non-zts-20090626/ Then you can do the command line install: $ pecl install xdebug You need to edit the php.ini file and you HAVE to uncomment:


Now you need to add these below:

xdebug.remote_enable = On
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "/Library/Application\ Support/appsolute/MAMP\ PRO/tmp/"
xdebug.collect_vars = On

Magento - write to a log file

Magento has a built in feature to write to a log file. In your code, you can use Mage::log(''). In the quotes, you can put in anything you want, in my example, i am adding some text and then the dynamic customer email address. Mage::log('Email sent to ' . $customer_email); This should end up in the /var/log/system.log Viewing that file, via command line, you can use: $ tail /var/log/system.log and that will show you the last 10 results. Make sure you remove this at some point or that log file will continue to grow and grow