Sunday, February 28, 2010
Sunday, February 21, 2010
Friday, February 19, 2010
How to fix image cache in magento and display it in frontend
- images in product catalogs - Resize the image to 170x170 and save it in /media/catalog/product/cache/1/small_image/170x170/9df....e95/images/
- thumbnail in shopping cart - Resize the image to 75x75 and save it in /media/catalog/product/cache/1/thumbnail/75x/9df....e95/images/
- thumbnail in product view - Resize the image to 70x70 and save it in /media/catalog/product/cache/1/thumbnail/70x70/9df....e95/images/
- thumbnail in my cart - Resize the image to 50x50 and save it in /media/catalog/product/cache/1/thumbnail/50x50/9df....e95/images/
Wednesday, February 17, 2010
Move Magento To Another Directory
If you’ve installed Magento in a subdirectory or even the root web directory and would like to move it somewhere else, here is how you do it.
Let’s say you have Magento installed in the following location:
http://www.yourdomain.com/store/
And you want Magento to be the first thing that comes up when visitors go to your site:
http://www.yourdomain.com We’ll assume you have a directory structure like this:
/home/username/public_html/ Meaning Magento would be installed here:
/home/username/public_html/store/
First, login to the backend of Magento and go to:
System -> Configuration -> Web Update the Unsecure and Secure URL for your store.
Next, connect to your site via SSH and go to the directory where you will be moving Magento:
- cd public_html/
Now, move all the files from the store directory to the directory you’re in:
- mv store/* store/.htaccess .
Delete the cache data:
rm -rf var/cache/ var/session/ And you’re done. Magento has now been moved up one directory.
Article from: http://www.magentocommerce.com/wiki/groups/227/move_magento_to_another_directory
Tuesday, February 16, 2010
Files affected after Magento upgrade
- Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".
Adding New Magento Theme
1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
create your own theme or create a theme based on the default theme.
2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
3. Login to magento admin panel and go to System -> Design
4. Click "Add Design Change"
5. From the "Custom Design" drop down list, select your newly created theme.
6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
7. Click "Save"
You can add more themes for as long as all theme will have different date range.
Moving magento to another server
1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
3. Make a copy your Magento root.
4. Move all data over to the new server.
5. Restore the database on the new host.
6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.
Monday, February 15, 2010
Magento table rates
- Go to System -> Configuration -> Shipping Methods
- Select a website in Current Configuration Scope at the top left column
- Click "Export CSV " button in the right column
- Edit the CSV and load it with data then upload it again.
Sunday, February 14, 2010
Upgrading Magento with a full package or via SVN
- Backup your database
- - In Magento go to Admin, System → Tools → Backups
- - You can use PHPMyAdmin (but this may fail due to time-limits on php scripts)
- - You can export in SSH by typing...
- - mysqldump -u USER -p DBNAME > dump.sql
- - Reimport using mysql -u USER -p DBNAME <>
- Backup all the code you modified yourself, and don’t forget to keep the original installation archive
- Take care of saving the media directory that contains all the uploaded product/category images
- Create a backup copy of app/etc/local.xml file
- Download a new installation archive or run SVN update if you checked it out from the Magento repository
- Extract and upload all the files it contains to your server
- Delete var/cache and var/session directories
- Point your browser to any Magento page
- Database upgrades should happen automatically
- You are done!
Upgrading Magento using the MagentoConnect Manager |
- Go to http://
/downloader - Log in using a user who has full permissions
- Make sure to select “Clear all sessions after successful install or upgrade”
How to upgrade from tarball installation |
It is possible that you will see no extensions in MagentoConnect Manager. This means that you have just uploaded the files without using PEAR downloader. In that case enter magento-core/Mage_All_Latest in the extension key field and click Install button. This will install all latest MagentoConnect core packages on top of existing files and will allow future upgrades through MagentoConnect.
If, after the install has completed and you hit Refresh, you get a 500 error, and you get the same on your regular admin page and your storefront, you may need to change permissions on your .php files. SSH into your server, navigate to your Magento directory, and check the permissions on index.php. If may have been changed from 644 (rw-r-r) to 666 (rw-rw-rw) during the install. If so, you can issue this command to change the permissions on all your .php files to 644 (the -v switch will make it verbose, so you will see all the changes as they are made):
find -type f -name ‘*.php’ -exec chmod -v 644 {} ;
(Please note there should be a backward slash before the final semi-colon but the wiki editor sometimes takes it out.)
Reload downloader/index.php to continue.
How to upgrade all available extensions |
There should be at least one extension marked in yellow, which means a higher version is available on the MagentoConnect server
- Click ‘Select all upgradable extensions’
- Click ‘Commit changes’
- Watch the console progress for error messages
- After successfully upgrading click the ‘Refresh’ button that will appear under the console frame.
How to upgrade specific extensions |
- For each desired extension upgrade choose ‘Upgrade’ in the dropdown
- To upgrade Magento Core modules choose the following packages, and all required dependencies will be upgraded automatically:
- magento-core/Interface_Adminhtml_Default
- magento-core/Interface_Frontend_Default
- magento-core/Interface_Install_Default
- magento-core/Mage_Core_Adminhtml
- magento-core/Mage_Core_Modules
How to upgrade MagentoConnect Manager |
- MagentoConnect Manager is not installed as a PEAR package by default. If you wish to upgrade it, you will first need to install it as a PEAR package.
- Enter
magento-core/Mage_Downloaderin the Extension key input field and click Install. - After it is installed the first time, you can upgrade it the same way as other extensions.
You can not uninstall MagentoConnect Manager
Using SSH shell access |
You need to discuss the folder/file permissions here!!!
- To initialize the Magento PEAR command line registry, run the following command from the shell. Make sure you are in the Magento root folder:
./pear mage-setup .- (make sure to include the second ‘.’)
- select php version (unix):
MAGE_PEAR_PHP_BIN=/usr/local/bin/php; export MAGE_PEAR_PHP_BIN- for 1and1.com hosting, to use PHP5:
MAGE_PEAR_PHP_BIN=/usr/local/bin/php5; export MAGE_PEAR_PHP_BIN
How to upgrade from tarball installation |
If you have not used MagentoConnect or PEAR command line to install Magento, you will need to enter this command for initial PEAR installation of all Magento core modules:
./pear install magento-core/Mage_All_Latest
(You may have to upgrade pear extensions using the next step for this step to work).
How to upgrade all available extensions |
./pear upgrade-all
How to upgrade specific extensions |
./pear upgrade magento-core/Mage_Core_Modules magento-core/Mage_Core_Adminhtml./pear upgrade magento-core/Interface_Adminhtml_Default magento-core/Interface_Frontend_Default magento-core/Interface_Install_Default
How to upgrade MagentoConnect Manager |
- If MagentoConnect Manager is not installed as a PEAR package yet:
./pear install magento-core/Mage_Downloader- After it is installed it will be upgraded just as any other extension.