Rated 4.8 out of 5.0 for Aresourcepool by 600 clients on over 1500+ projects.

Magento queries

How to fix top 10 Magento issues that can destroy your web store

Magento is the most popular e-commerce platforms for e-commerce business. Magento is the very reliable platform which powering more than 29% of the ecommerce stores followed by wooCommerce 26% and shopify 11% in the Alexa’s top one million websites.

It is a powerful platform but it is still a software program and there are few particular problems. We’ve collected the top 10 Magento issues and providing their solutions.

Problem 1:

How to re-set or change password of Magento admin

Solution:

There are two way to reset or change password.

Method 1:  (Less Secure)

If you want to reset or change the password then you need to navigate to phpMyAdmin, then select the corresponding database and find admin_user table. Here in admin_user table, you can replace the old password with a new one. Here make sure your password should be in a MD5 function

Method 2:  (More Secure)

Second way to change the password is to insert the following MySQL query into SQL tab

For Existing user:

UPDATE admin_user SET password = CONCAT(MD5(‘xxNewPassword’), ‘:xx’) WHERE username = ‘UserName’;

xxNewPasswordyou new password (exp. [email protected])

UserName: user name of admin

For New and Existing user:

If you have a clean development/test environment and you want to add a new admin user from scratch, then please do the following MySQL queries. This Query is also useful for updating existing users.

#Creating new admin user or updating existing one by username

INSERT INTO admin_user

 (email, username, password, is_active)

VALUE

 (‘[email protected]’,’magento’, (SELECT MD5(‘password’)), 1)

ON DUPLICATE  KEY UPDATE

username = ‘magento’, password =(SELECT MD5(‘password’)),is_active=1;

# Creating default admin-user group if not existing. Necessary on clean installation – there’s no Administrators group, thus no permissions can be granted to admin user

INSERT IGNORE INTO admin_role

   (parent_id,tree_level,sort_order,role_type,user_id,   role_name)

VALUES (  0,    1,    1,   ‘G’,  0,  ‘Administrators’);

# Creating our account to access all things in admin panel

INSERT INTO admin_role(parent_id,tree_level,sort_order,role_type,user_id,role_name)

VALUES

( 1,  2,  0,  ‘U’,(SELECT admin_user.user_id FROM admin_user WHERE username = ‘magento’), ‘Super User’);

Problem 2:

How to solve ‘Access Denied’ issue of Magento

Solution:

If you want to solve an “Access Denied” issue, then you need to log out from Magento admin panel and then login back again.

Then go to:

System > Permissions > Roles > Administrators 

And then make sure that Resource Access is set to All.

Now click Save Role button and then this issues will be fixed.

Magento Development Company - AresourcePool

Problem 3:

How to change your Magento Admin URL

Solution:

If you want to change default Magento URL (/admin/), then navigate to app/etc/ and open local.xml file. Find the code:

<admin>     
<routers>         
<adminhtml>            
 <args>               
  <frontName><![CDATA[admin]]></frontName>             
</args>        
 </adminhtml>     
</routers>
</admin>

And change the “admin” value.

Now clear the cache of Magento, then test if new URL is working or not and make sure that an old one returns 404 code. 404 error represent that earlier or provided URL is no longer available.

Problem 4:

How to create SEO Friendly URLs in Magento

Solution:

As per google suggestion following are:

SEO friendly URL:         /product-catalog.html

Not SEO friendly URL:      mycatalog/productlist/view/id/342267

To get SEO friendly URL on your Magento, you should navigate to:

 System >>Configuration

Magento Development Company - AresourcePool

Now select “Web” from the left navigation menu,

Then select Search Engine Optimization

Now set Use Web Server Rewrites to Yes and click Save Config button… Now your Magento SEF URLs will be enabled.

Magento Development Company - AresourcePool

Problem 5:

How to disable the “Compare products” functionality

Solution:

If you want to disable compare functionality on Magento then go to your Magento root folder, find app/code/core/Mage/Catalog/Helper/Product/Compare.php

and replace following:

public function getAddUrl($product)

{

return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product));

}

Replace above code with following

public function getAddUrl($product)

{

//return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product)); return false;

}

Now you need to find /app/design/frontend/base/default/layout/catalog.xml

And editcatalog.xmlfile.

Don’t forget to use your theme name if you are not using a default one.

Find the below code in catalog.xml file

<block type=”catalog/product_compare_sidebar” before=”cart_sidebar” name=”catalog.compare.sidebar” template=”catalog/product/compare/sidebar.phtml”/>

And replace above with following code

<!–<block type=”catalog/product_compare_sidebar” before=”cart_sidebar” name=”catalog.compare.sidebar”

template=”catalog/product/compare/sidebar.phtml”/> –>

Once done with above modification in your file, then clear the Magento Cache from 

Admin area >> System >> Cache Management

Problem 6:

How to set-up your Magento site on a New Domain

Solution:

If you want to change your configured Magento website from:

www.abc.com => TO =>www.xyz.com

Then you need to do two things…

  1. Edit database settings

Now Open cPanel-phpMyAdmin and then select your Magento database from the left menu and find the table core_config_data.

In core_config_datatable, you can see two fields:

  1. web/unsecure/base_url
  2. web/secure/base_url.

Now Change your old domain name with your new domain name and click the Go button to save the all changes.

  • Clear cache

The cache folder is located in your Magento installation directory – /var/cache. To clear the cache, you just delete the folder and go to your Magento admin System > CacheManagement and clear all Cache.

Problem 7:

Magento categories are not showing on the frontend

Solution:

Sometimes categories are not showing, there may be several reasons for that. Then what to do?

Then First of all, make sure that all your created categories are placed inside the default category. And also, Is Active and Is Anchor (inside Display Settings tab) should be set to Yes.

Now after above changes, check if the Root Category is specified correctly.

And finally, you may need to do Refresh Cache (it’s inside System >>Cache Management)

Problem 8:

How to Add a Contact Us form in Magento

Solution:

Contact form functionality in Magento is included in by default. In Magento store, you can see the link of contact Page is usually shown in the footer of Magento store. If you want then you can add a contact form on any page as per your requirement.

Now follow the steps:

Login into your Magento admin and go to CMS > Pages and click on new page button.

Now use the following code in your new page content field as shown in right side in above image:

<!– CONTACT FORM CODE BEGIN–>                                                           

{{block type=’core/template’ name=’contactForm’ template=’contacts/form.phtml’}}

<!– CONTACT FORM CODE END–>

Now click on Save Page and then contact form will appear on that page.

Problem 9:

Redirect Magento to open through www

Solution:

If you want to make your Magento website open through WWW, then you need to access .htaccess file. This .htaccess file is located in the Magento root folder. Now search RewriteEngine and insert the following given code in .htaccess file.

RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

Now save the .htaccess file, then login into your Magento Admin and navigate to System > Configuration > Web. After that Unfold the Unsecure tab and change the base URL to http://www.mydomain.com instead of http://mydomain.com.

Click Save Config and your Magento store will start working through http://www.mydomain.com.

Problem 10:

How to set up a blog in Magento

Solution:

In Magento, It doesn’t have a blog functionality by default. But it can be done with the help of a custom extension. If you don’t want to spend time searching, just try Blog extension.

In Magento, Installing a blog extension is similar to the general extension.When blog extension will be installed then you will have an additional section in the top Menu of Magento admin panel that’s called Blog.

Why we Blog needed in Magento:

  1. Blogging Attracts Organic Traffic to your Magento Store
  2. It Achieve Higher Rankings
  3. Blog helps to Increases Engagement
  4. In blog you can Showcases Your Products
  5. Blog helps to gains Consumer Confidence
In this post we have covered some common but very important Magento problems. Many Magento users are suffering with these problems. We have tried to provide solutions of the most common problems in this post.