Magento Themes and Magento Extensions

Get rid of ?__store=default from your Magento links

Share
Posted on May 15th, 2013 | Posted by admin

If you’re like me, you make use of a lot of widget links within Magento, and those Widget links have a pesky habit of adding ?___store=default to the end of your URLs, which first of all don’t look nice and it certainly doesn’t help your optimisation efforts when it comes to SEO and ridding yourself of duplicate content.

This is a dead simple fix, and gives you peace of mind.

Simply copy the follow file: app/code/core/Mage/Catalog/Block/Widget/Link.php and paste it into app/code/local/Magento/Catalog/Block/Widget/Link.php

Then lines 89 – 92 need to be commented out. These lines look like this: (if it changes in future versions!)

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

Share
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'); ?>

OR

    <?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

Share
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?

Share
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));
    $this->getSelect()
        ->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

Share
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