Showing posts from December, 2010

Avoid duplicate content on Google while your site accessible by both www/non-www URL

Hey Guys,
It has been issued about duplicate content as well as has Google Canonical problem when your site accessible both under and
For ex.: socking fact is that,  these all are different URLs. From the search engine perspective, this can cause bit of an issue.
To avoid such problems you can use the following lines in your .htaccess file,
For www version of your web:
RewriteEngine on RewriteCond %{HTTP_HOST} !^$ RewriteRule ^(.*)$$1 [R=301]For Non-www version of your web:
RewriteEngine on RewriteCond %{HTTP_HOST} ^www.your_domain\.com$ [NC] RewriteRule ^(.*)$$1 [R=301,L]Another Way is :
By Canonical Tag:
The Canonical Tag look like this:
<link rel=”canonical” href=””/>
You have to simply add this tag inside (HEAD) section and also specify your preferred version of a URL.
This is a great step to…

Speed up Magento Performance

Below is the list of ways to speed up your Magento site. :)

Hosting Environment

Ø  Host only those files that you have to use
Ø  Go to MySql Admin and select all the tables and repair and then optimize them
Ø  Use PHP Accelerator like APC, Zend optimizer , Xcache
     APC –
     Xcache –
     Note: By default magento stores its cache into file system
    You have to add following code into local.xml
………………….After saved your changes, remember to refresh cache.
Ø  Enable GZIP/DEFLATE compression in .htaccess.Go on this link and enter your magento site address. If it come back with green tick and say is gzipped then skip next step. If not then go on next step.Find following lines in your .htaccess file and replace them with following code<IfModule mod_deflate…

Take order amount in but not in 1.4

Hi Buddies,

If we make module which perform some action on order place time in magento and now same thing want to upgrade on 1.4. . But what we see, no payment amount, currency are shown. . (this was happening only when we take order amount from the checkout session which work on 1.3 but not on 1.4).

It is just because, In magento, checkout session was flushed after placing order, but in magento 1.4 version it is flushed on order place time.

Don’t be panic, just take amount, currency, or whatever data you need. . take it from the order object.

$orderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId();
$order = Mage::getSingleton(‘sales/order’)->load($orderId);

//for amount

Cheers :)