Friday, February 26, 2010

magento - install live site on local system

Steps you must take care while installing live site on local server:

1) Download all files and folders to local system.

2) Download all DB and install it on local system.

3) Open DB and search for core_config_data, change the live url to the local one.

4) Change the document root in pear.ini (downloader\pearlib\pear.ini), without it you cannot able to upgrade your local magento with latest updates.
Note: you must count the number of words you are placing in it and replace it, for example its written there as S:42 and your word count is 52 then replace 42 with 52.

Hope this help

Magento connect is not working

After researching a lot I found the solution that you have to have update your magento and for that use this extension key "magento-core/Mage_All_Latest"

Your admin wont allow you to logged in due to latest version.. to resolve the problem delete CACHE folder from "app\code\core\Zend"

After this your site starts working but it wont show any product under any category.

To restore products with its respective categories you need to reindex the products from system->Index Management

Friday, February 19, 2010

Use Gmail Account SMTP in PHP

Use php mailer() function in place of php mail().

You can use PHPmailer :
http://phpmailer.codeworxtech.com/

what you need to do is, change the value of host to
$host = "ssl://smtp.gmail.com";

and port number to
$port = 465;

Username will be your gmail id

magento google base feed generator

By installing this extension you can export your products from your Magento Store into a feed that can be automatically imported into SingleFeed's system. SingleFeed then can submit your products to over a dozen comparison shopping engines including Google Base/Product Search, Nextag, Shopping.com, Pricegrabber, Shopzilla, Yahoo Shopping and many more.

http://www.magentocommerce.com/extension/712/singlefeed-export-module

This Extension is very good and freely available.

I tried lot of search but did not find any suitable solution and when found I though it would be benifical for all my friends out there to save their time.

Thursday, February 18, 2010

Magento how to change content of 404 page and remove advertisement/ads

Login into Magento Admin section and follow this path:

-> Admin-> CMS -> Manage Pages

Click On "404 Not Found 1" Page and edit the content according to your requirement.

You can remove the advertisement from the content section by removing the bottom two images.

Wednesday, February 17, 2010

magento set base currency through code

Use this code in your magentoRoot/index.php

Mage::app()->getStore()->setCurrentCurrencyCode('USD');

Write this code before Mage::run();

Note: The currency code you gave above must be set in magento admin in currency setup module.

Monday, February 15, 2010

Magento : Add option in display mode of display setting in magento admin panel

Hi This was my requirement:

Client want to set the category view from admin and the subcategory will show in following views:

1) Category Title + Image + Description
2) Category Title + Image
3) Category Title Only

So to add more options in the admin section you need to modify in the following files:

Tuesday, February 9, 2010

Displaying Custom Attributes on Product View Page of Magento

These methods will be used to get the custom attributes for any products

File that you need to make change will be find here:
magentoRoot/app/design/frontend/default/default/template/catalog/product/view.phtml

If it is a text field (textbox or textarea), this is all you have to do:
 echo $_product->getAttributeName()

If your Attribute Code is "shirt_color, then you would use getShirtColor(). Remove the underscores and capitalize the first letter of each word. If you use getshirtcolor(), it won’t work.

If you are using a dropdown or a multiple select, you have to call it a little differently:

echo $_product->getAttributeText('shirt_color)

Hope this helps.

Monday, February 8, 2010

Magento Change "Tax" to "VAT"

Open the Languge File located in

/magentoRoot/app/locale/en_US/Mage_Tax.csv

You will find the text "Tax" in 2nd para of 93th line.

You can replace the any other variable with your desired variable from this folder.

Hope this help.

PHP Extension curl must be loaded in xampp

I got this error while installing magento "Make sure curl extension is enabled in your php.ini"

I found the solution and hope this help for you also.

C:\xampp\php\php.ini

Search for php_curl.dll

Replace ;extension=php_curl.dll with extension=php_curl.dll (remove ;)

Restart Apache

Hope this helps