Engine23

Magento Ecommerce Strategy, Design & Development

JQuery no conflict

To use jQuery in no conflict you can use:

<script type="text/javascript">
  $.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
</script>

Backing up and restoring mysql from command line

Back up From the Command Line (using mysqldump) If you have shell or telnet access to your web server, you can backup your MySQL data by using the mysqldump command. This command connects to the MySQL server and creates an SQL dump file. The dump file contains the SQL statements necessary to re-create the database. Here is the proper syntax:

$ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
  • [uname] Your database username
  • [pass] The password for your database (note there is no space between -p and the password)
  • [dbname] The name of your database
  • [backupfile.sql] The filename for your database backup
  • [--opt] The mysqldump option

For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql, you should accomplish this command:

Read more

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_design_prepare_form

adminhtml_cms_page_edit_tab_main_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_tree_is_moveable

adminhtml_catalog_category_tree_can_add_root_category

adminhtml_catalog_category_tree_can_add_sub_category

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_edit_element_types

adminhtml_catalog_product_attribute_set_main_html_before

adminhtml_catalog_product_attribute_set_toolbar_main_html_before adminhtml_product_attribute_types

Read more

POSTFIX

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