Thursday, January 10, 2013

Magento Tips: 404 Not Found error after Magento module installation




Sometimes after Magento modules installation, you can see 404 page not found error in your Magento administration zone.




To fix this error, try to re-save permission role of your administrator user, using Magento admin zone -> System -> Permissions -> ‘Roles’ page -> Administrators -> Click on ‘Save Role’ button.


Don’t forget to clear Magento cache after this.

Wednesday, September 5, 2012

Sql query for getting Category id and name from magento database table


SELECT `entity_id`,`value` FROM `catalog_category_entity_varchar` WHERE `attribute_id` = 3 and
`entity_id` IN(SELECT distinct(`entity_id`)  FROM `catalog_category_entity` WHERE `path` LIKE
'%1/xxx%')
For more than one store
Take the root category id  of store from admin and put it in place of 1/xxx as 1/categoryid
Also you have to search in table `catalog_category_entity_varchar'  for attribute_id  by giving the name of you store root category in place of value field.

SELECT  `attribute_id`   FROM `catalog_category_entity_varchar` WHERE `value` = "your category name";

Monday, April 23, 2012

How to Create different store view with different sub-domain in magento

How to create store view


1. Go to admin then select tab System->manage stores
2.Click create store view and complete the form and save store view
then you will be able to see in the list.

How to Change the Base URL for each Store view


1.. Go to admin then select tab System->configuration
2.On the left side of the page General under that select web but before that you have to change the Current Configuration Scope to your store view name
3. Edit the base url to you subdomain(eg: http://en.yourdomain.com)
4.click save config.

How to change .htaccess for redirecting to store view if you call the subdomain


1.Your .htaccess file is at the root folder of magento.
2.Search for "RewriteEngine on" word  in .htaccess file and write the code below it

RewriteCond %{HTTP_HOST} ^en.yourdomain.com
RewriteRule ^ - [E=MAGE_RUN_CODE:english]
RewriteCond %{HTTP_HOST} ^fr. yourdomain .com
RewriteRule ^ - [E=MAGE_RUN_CODE:french]

 then save the .htaccess file and try to clear all cache and browsing history from your browser as well as from magento