The Complete Magazine on Open Source

10 big challenges while building an e-commerce site on Magento

2.75K 0

Magento

Magento is a technically advanced and complicated platform. To develop Magento e-commerce stores, Magento developers need to inject a perfect blend of hard work alongside strong dedication into their projects. As a Magento developer, many times you come across several issues that can shake up your mind considerably and find it difficult to accomplish Magento development projects. It does not matter whether you are an experienced Magento developer or a novice, you do face some challenges while dealing with Magento. So here we are listing ten big challenges that are quite commonly faced by Magento developers and explaining you how they can be sorted out.

Slow loading

There could be a number of reasons behind the slow-down of your Magento e-commerce site. It can be due to an extension overload (using numerous extensions and modules), core code hacking attempts, not using the Magento full-page cache (FPC), shared hosting or heavy reliance on third-party applications.

However, you can solve them using the below solutions.

  • Use only those extensions and modules which are meant for your site
  • Optimise images and contents very well and make your site light as far as possible
  • Enable full-page caching on your site by going to the ‘Cache Management’ option from ‘System’ settings
  • Install APC or Xcatche to help your site load faster on electronic gadgets
  • Host your site on a dedicated server as it helps your site to load quickly on all electronic devices

Setting a custom user group

To create a new group from your Magento admin area, you need to go to the option ‘Add New Customer Group’ from the ‘Customer Groups’ option within the Magento admin area.

When a customer signs up, you can change the group (with which they belong to) easily by going to ‘Manage Customers’ option from the ‘Magento Customers’ settings. And then, click the edit link in front of the customer entry and alter the group from the ‘Account Information’ menu in the ‘Customer Group’ settings. Once you are done with the creation of a new custom user group, hit the save button.

Also, you can set a discounted price for certain customer groups by adding a new rule from the ‘Add New Rule’ option available in the ‘Promotions’ settings.

Configure site to work with a new domain

Suppose that your Magento is configured to work with www.abcdomain.com, but you wish to change the domain to www.xyzdomain.com. It is possible. You need to update your Magento unsecure base URL and secure base URL to use the new domain.

Sign into your Magento admin panel and then go to ‘Web’ from the ‘Configuration’ system settings. In the ‘Unsecure’ section, change the base URL from https://www.abcdomain.com to http://www.xyzdoamin.com. Repeat the same for the base URL setting in the Secure section and then save the changes you made by clicking on Save Configuration. At last, remove all the Magento cache. After this, you can land on your Magento store using the new location.

Solve “Access Denied” problem

On several occasions, you come across the error “Access Denied” when you try to visit your webpage. This happens because of admin role permissions. In order to resolve this issue, log out from the Magento backend and then login again.

If this technique does not solve your problem, and you still have the problem, you should reset the admin privileges by going to the ‘Administrators’ option from the ‘Permissions’ settings. Now, click on the ‘Role Resources’ option on the left menu and look whether Resource access is set to all or not.

At the end, click the save role button to reset the admin permissions.

Reset Magento Admin password

Tech-savvy people often forget the password of their e-accounts and Magento developers are not an exception to it. If you have forgotten the password for your Magento site, there are two ways to reset it:

  1. By email
  2. PhpMyAdmin

By email

It is the easiest way to reset the Magento administrator password.

You just need to go to the Magento login page and then a simple click on the ‘Forgot your password’ link would send you all the necessary instructions over your provided email address to help you reset the password.

If this method does not work for you, then you can leverage a bit technical way.

Using phpMyAdmin

To reset your password through this method, you need to go to your site’s cPanel and then open phpMyAdmin. There you will be provided with an option to choose your Magento database and find admin_user table to create your new password.

Reset Magento password using PHPMyAdmin

PHPMyAdmin gives you a technical solution to reset your Magento password

Adding a ‘contact us’ form

Contact us form is an important page for all websites. It allows users to contact the website operators easily and get their issues solved. The contact form functionality is available in Magento by default. Therefore, you can add your own ‘contact us’ form on your Magento site by following the below steps.

Sign in to the site’s admin area and go to the ‘Pages’ option from the CMS.

Make a new page or choose a page that you want to edit and then paste the below code by making use of the HTML option.

Magento contact form

Magento comes with a default option to let you create ‘contact us’ forms

<!– CONTACT FORM CODE BEGIN–>{{block type=’core/template’ name=’contactForm’ template=’contacts/form.phtml’}}<!– CONTACT FORM CODE END–>

Now, save the changes you made and contact us form will get appeared on the desired page.

Search engine-friendly URLs

Search engine algorithms give great importance to the URL of webpages while finalising their relevancy. Your site can rank high in Google and perform better if you use small and relevant words to create the URL for your webpages.

To enable search engine friendly URLs in Magento, sign into the Magento admin area and then go to the ‘Search Engines Optimisation’ option from the ‘Web’ system settings. Thereafter, you need to set the ‘Use Web Server Rewrites’ option to yes. Once it is done, Magento SEF URLs get enabled.

Magento SEO options

Magento admin panel offers by default SEO options

Setting up a blog in Magento

You should keep this in mind that blog functionality is not available in Magento by default. You can use an extension to fulfill this very specific purpose. To set a blog in Magento, obtain the extension key and insert it in Magento connect for your website. When you install the extension, you will get an extra section in the Magento admin area on the top which is called a blog. From there, you can adjust the blog settings, add posts, images, etc.

Redirect Magento to open through www

In order to redirect your Magento site to open through http://www.xyz.com, you need to make some modifications. To do so, open the .htaccess file in the Magento folder and find the “RewriteEngine on” line. Here you need to add following lines:

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

When you finish it, save the .htaccess file and then go to the configuration menu from the admin area and click on the Web. Now, open the Unsecured set of options and change the Base URL option from xyzdomain.com to www.xyz.com. Save the changes you have made. After this, your website will start running with www.xyz.com.

Disable the compare products functionality

Compare product is a default function in Magento. If you do not need this function on your Magento e-store, then you can remove it completely in two different ways detailed here below:

Through installing an extension

In this method, you need to install a Magento extension called Advanced Compare on your e-store. When the installation process gets finished, an option will be added to your Magento admin area to help you close the default compare feature.

By breaching the Magento core files

First of all, you need to take the backup of your files to avoid any data loss in case any web application crashes. A Compare.php file is located inside the folder-~/app/code/core/Mage/Catalog/Helper/Product/.

Another file, catalog.xml is located in the folder ~/app/design/frontend/base/default/layout/

Just edit app/code/core/Mage/Catalog/Helper/Product/Compare.php and code as shown here below:

public function getAddUrl($product){return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product));} to

public function getAddUrl($product){//return $this->_getUrl(’catalog/product_compare/add’, $this->_getUrlParams($product)); return false;}

Edit ./app/design/frontend/base/default/layout/catalog.xml ( in case, you are using a different Magento theme, use its name in place of default one) and change the code shown here below:

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

To

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

When you complete this process, delete your site’s cache by going to the ‘Cache Management’ option by going to the ‘Cache Management’ option from the admin panel.

These are some of the main issues faced by Magento developers when they try to build E-shop on Magento. If you are a Magento developer, this article will certainly help you diagnose the issues you come across while Magento development and sort them out easily.