Magento Themes and Magento Extensions

Magento : How add translation ability into cms page or static block ?

Posted on May 14th, 2013 | Posted by admin

As we all know magento have multi-language store. Magento use following syntax in .pthml to make text translate to multi-language which is like this :

    <?php   echo $this->__('text to translate'); ?>


    <?php   echo Mage::helper('ModuleName')->__('text to translate');  ?>

But text written in cms page or static block have not translation ability.
To make cms page or static block text compatible with translation ability we need to do some extra coding work which is like this:

We can use following directive in cms page or static block

{{translate text="text to translate"}}

To make it working in cms page or static block we need to add directive function in magneto code as show in following steps.

Remove indexing notification on magento

Posted on May 13th, 2013 | Posted by admin

This index notification that magento has not yet been indexed its categories,artibuts and so on relly anoyes when it come to appear each time we login an use the Magento admin panle

it is luck as the following:

One or more of the Indexes are not up to date: Product Attributes, Product Prices, Catalog URL Rewrites, Product Flat Data, Category Flat Data, products including in this category, Catalog Search Index, Stock Status, Tag Aggregation Data. Click here to go to Index Management and rebuild required indexes

How to create a sub-query on Magento Way?

Posted on May 11th, 2013 | Posted by admin

How to create a sub-query on Magento Way?
You can use the next examples:

public function getActiveCustomers($date)
    $orderTable = Mage::getResourceModel('sales/order_collection')
        ->addFieldToFilter('created_at', array('gt' => $date));
        ->joinLeft(array('order_table' => new Zend_Db_Expr( '(' . $orderTable->getSelect() . ')')),
'e.entity_id = order_table.customer_id')
        ->where('order_table.entity_id', 'notnull');
    return $this;

How to Clean Magento Cache Properly

Posted on May 10th, 2013 | Posted by admin

One of the most important tasks you need to remember after each major change (and before Magento upgrade) is to clean up your Magento cache.

Login to Admin Panel
Go to System Cache Management
Select all Cache Types, choose Refresh from the Action dropdown and click on Submit button
Click on Flush Magento Cache
Click on Flush Cache Storage
Click on Flush Catalog Images Cache
Click on Flush JavaScript/CSS Cache
Not satisfied? Then login to your Linux server and clean up tha cache folder manually

How to Debug Magento

Posted on May 9th, 2013 | Posted by admin

You can add your own debugging code pool in addition to core, community and local. This is what Magento team uses foe debugging.

require_once $mageFilename;
$debuPath = BP . DS. ‘app’ . DS . ‘code’ . DS . ‘debug’;
set_include_path($debugPath . PS . get_include_path());

Page 4 of 6« First...«23456»