Search This Blog

Sunday, 9 December 2012

Adding a mass action to Magento Grid

http://www.blog.magepsycho.com/adding-new-mass-action-to-admin-grid-in-magento/

Adding a new button on order view page:
http://stackoverflow.com/questions/10691895/magento-add-button-to-sales-order-view-page-observer-event

Add a comments field to checkout page for the order:
http://www.magecorner.com/magento-order-comments/

Adding custom system config xml in Magento:
http://www.ecomdev.org/2010/10/27/custom-configuration-fields-in-magento.html

Adding a button to system configuration:
http://www.atwix.com/magento/add-button-to-system-configuration/


DB queries profiler:
Magento provides an ability for developers to track database queries. For this purpose you should use a built in DB resource profiler. It can help you to inspect database queries, detect the longest query, detect the slowest query, etc.. Here is a small example on how to use a DB profiler for your own needs :
$profiler = Mage::getSingleton('core/resource')->getConnection('core_write')->getProfiler();
foreach ($profiler->getQueryProfiles() as $query) {
    $queryTime[] = $query->getElapsedSecs(); // Get the query execution time
    $queryRaw[] = $query->getQuery(); // Get the query text
}

1 comment:

  1. Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!..
    newizze

    ReplyDelete