Speeding Up your Magento Website

Series of articles about speeding up the magento site.

  • Disable Breadcrumbs in Magento

    Posted on December 22, 2012 by Nimrod Techn

    Go to the layout directory in app/design/frontend/default/* (your current theme), edit page.xml (if not there, copy from base directory) and modify the following:

    Change:

    <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

    To:

    <!-- <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> -->

     


    This post was posted in Speeding Up your Magento Website

  • Deactivate Magento Visitor Logs

    Posted on December 22, 2012 by Nimrod Techn

    Magento can be a beast. Every time a potential customer visits the website, several SQL queries run to log his details in the DB.
    Not only that this is unnecessary (most of the details, except for the IP, are tracked by Google Analytics anyway), this could be a serious performance issue.

    How to deactivate?

    Copy /app/code/core/Mage/Log/Model/Visitor.php

    To: /app/code/local/Mage/Log/Model/Visitor.php

     

    Change the 4th line:

    protected $_skipRequestLogging = false;

    To:

    protected $_skipRequestLogging = true;


    This post was posted in Speeding Up your Magento Website

  • Magento - Sales Orders Grid - Display Today's Orders Only

    Posted on December 22, 2012 by Nimrod Techn

    Typically, when a Magento store reaches 20,000 orders and more than 5 people load the sales-orders grid concurrently, our online store becomes extremely slow.

     

    How do we solve it? simple. limiting the amount of orders presented in the orders grid for the last 24 hours, unless requested otherwise.

    Copy the app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php file to:

    app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php

    Edit the following function, copy-paste from here:

    protected function _prepareCollection()    {

    $collection = Mage::getResourceModel($this->_getCollectionClass());

    ######################## FILTER BY LAST DAY ######################
    $now = Mage::getModel('core/date')->timestamp(time());
    $filter   = $this->getParam($this->getVarNameFilter(), null); //important - check for other requested grid-filters before filtering today's orders

    $dateStart = date('Y-m-d' . ' 00:00:00', $now);
    $dateEnd = date('Y-m-d' . ' 23:59:59', $now);
    $postData = Mage::app()->getRequest()->getPost();
    if (empty($filter)) {
    $collection->addFieldToFilter('`main_table`.created_at', array('from' => $dateStart, 'to' => $dateEnd));
    }
    ##################################################################

     

    $collection->getSelect()->group('entity_id');
    $this->setCollection($collection);

    return $this;

    }


    This post was posted in Speeding Up your Magento Website

Items 1 to 3 of 4 total

Page:
  1. 1
  2. 2
Magento is a well-engineered eCommerce platform designed to help engineers develop customized eCommerce online stores. Due to lack of proper coding documentation, Engineer-ing.com was created with the sole purpose of instructing Magento developers to-be with the "how-to-do" know-how. In the event of unresolved issues, you are more than welcome to contact me for consultation. However, please do so only if you possess a Software Engineering background and you're able to specify your question.