15 Most common Magento Interview questions and answers for Magento developers

When looking for a job as a Magento developer, you don’t know what will be questioned in your job interview? In this article, I’m going to summarize most common Magento interview questions and of course, answers so that you will have a better preparation for your Magento Job interview. Let’s get started. (for more knowledge on Magento, check our beginner or developer tutorial section on Magento explorer)

Q&A 1

Q: What is Magento

A: Magento is an open-source content management system for e-commerce web sites. The software was originally developed by Varien Inc., a US private company headquartered in Culver City, California, with assistance from volunteers. Magento provides online merchants with an exceptional flexibility and control over the content, look and functionality of their e-commerce store.

Q&A 2

Q: How many platforms of Magento? (updated)

A: There are 4 platforms of Magento

– Magento Community Edition: fully open souce, the most popular platform of Magento, no support. You can edit everything you want, add new extensions provided by other Magento developers

– Magento Enterprise Edition: Paid platform, containing more features and functionnality. This edition is designed for big business with technical support

– Magento Go edition: Cloud based platform, hosted by Magento Inc, including built-in Modules and can also add more Magento extensions. This edition was stopped in February 1, 2015

– Magento 2: This is a new release of this eCommerce platform which contains many new and improved features, and its architecture is quite different from all the previous versions. Magento 2 was released in July 2015. Since then Magento 1 and Magento 2 have existed simultaneously, but only Magento 2 has new updates.

Q&A 3

Q: Explain Magento’s MVC architecture

A: MVC stands for Model-View-Controller. Any application that separates it’s data access, business logic and user interface is called MVC. There can be two types of MVC: convention-based and configuration-based. Example, cakePHP is convention-based, i.e. you just need to follow the instructions of the core system to get your module ready in just few lines. Magento is configuration-based, i.e. you need to specify each and every thing to your module’s config file in order to get it work. Magento has Controller (for Routing), Block, Model and Template file.

Model: Model is the classes providing data, service related to data and business logic. This class works directly with data and provides data for other elements. In a module, these classes are contained in Model folder.

View: View is the classes which define data presented method (not update data). These classes are contained in the folder Block of module.

Controller: Controller is the classes which control application stream. They receive input which is requirement of users through HTTP request, transfer those requests to the classes which process the requests directly. From the link, Router will get to Controller which controls that link. In Magento module, these classes are contained in controller folder.

How MVC Works? Take a look at the following chart to understand (click for full size)

Q&A 4

Q: What scripting language and database management system does Magento use?

A: Magento use PHP as scripting language and MySQL for database. Database: MySQL 5.6 (Oracle or Percona). PHP version: PHP 5.4, PHP 5.5
Q&A 5

Q&A 5

Q: How to enable Maintenance mode in Magento?

A: To enable Magento Maintenance mode, create  a file named maintenance.flag and upload to your Magento home directory. The file contains the following code:

Q&A 6

Q: What is static function?

A: Static function is silent function of a class, which is stored in the memory space of a class (not objects)

Q&A 7

Q: When you make a new EAV module, how many tables will be created?

When making a new EAV module, there will be 6 tables created including: module, module_datetime, module_int, module_decimal, module_varchar and module_text. Table “Module” is the main entity table, and rest 5 tables which holds attribute’s data in different data types.

Q&A 8

Q: How to reset admin password in Magento

A: We explained how to reset admin password in Magento using PHPmyadmin in this tutorial.

Q&A 9

Q: How to create magento custom module?

A. Basically there are 4 steps to create Magento custom module:
Namespace : Mag
Module Name : Magentoexplorer
1. Create module directory Magentoexplorer in app/code/local/Mag
2. Create controller, block and module files for your module.
3. Create module configuration file (app/code/local/Mag/Magentoexplorer/etc/config.xml).
4. Create xml file (app/etc/modules/Mag_ Magentoexplorer.xml) so that you can enable or disable module and tell magento system from which code pool that module will be taken.

You can take a look at this tutorial to learn how to create a basic Magento custom module: https://magentoexplorer.com/how-to-create-basic-magento-hello-world-module-from-scratch-in-magento-1-8-and-1-9

Or for Magento 2 Building a Magento module from scratch

Q&A 10

Q: How to change admin URL of Magento?

A: There are 2 ways to change admin URL of Magento:

1: Go to app/etc/local.xml file, search for <frontName>tag, replace adminpanel with your new admin url

e.g we have chnaged the adminpanel url to adminmagento in below example

2: You can also change Admin URL of magento in Admin panel of Magento

In your admin panel, go to  System -> Configuration->Advanced ->Admin→Admin Base URL→Use Custom Admin URL, select to  ‘yes’ to use custom admin URL, now enter new admin path in Custom admin path  field and save it.

Q&A 11

Q: What is codepool in Magento? How many types of codepool in Magento?

A: CodePool is a tag that we have to specify while registering a new module in app/etc/modules/Namespace_Module.xml

There are 3 types of codepool: CommunityCore and Local  

Core pool: This is core folder of Magento which is built by Magento core developers and we should not make any changes in this folder. It contains all the essential code of Magento.

Community pool: This folder is made for community Magento developers, which makes Magento the best opensource ecommerce platform. This is where you can place in 3rd party Magento extensions, you can get 3rd party Magento extension from Magento connect or purchase directly at developers’s website, some well-known Magento extension providers are Aheadworks, Magestore, Amasty…

Local pool: If you are a Magento developers and you want to make changes in code of Magento, local pool allows you to do that.  The local codepool will always gets loaded first so you to easily change anything instantiated in the Community or Core Codepool.

Q&A 12

Q: How to convert default currency to others in Magento?

A:To convert the default other currency we need to select that currency in allowed currency and import currency rates from System->Manage currency ->Rates .

For example, if you want to convert Price from USD to GBP ,  you can use this syntax to convert currency:

 Q&A 13

Q: How to add a blog to Magento

A: You can create a custom module to build a blog for Magento, or simply, use prebuilt Magento blog extension by Aheadworks (free). Take a look at the tutorial here http://tutorialmagento.com/setup-a-free-blog-for-magento-site-with-aheadworks-blog-extension

You can also use some extensions to integrate WordPress blog to your magento site, this one is an example http://www.magentocommerce.com/magento-connect/wordpress-integration-3795.html

Q&A 14

Q: How to put Magento store to Maintenance mode but still allows admin to enter site?

A: To set Magento store to maintenance mode, put a file named maintenance.flag in your magento root directory

To allow admin or any user you want to enter site while it’s still in Maintenance mode, use this code:

Replace with your allowed IP

You can also read this tutorial for more detail

Q&A 15

Q: How many design patterns in Magento?

A: There are 12 design patterns in Magento, they are:

1. Model View Controller Pattern

2. Front Controller Pattern

3. Factory Pattern

4. Singleton Pattern

5. Registry Pattern

6. Prototype Pattern

7. Object Pool Pattern

8. Iterator Pattern

9. Lazy Loading Pattern

10. Service Locator Pattern

11. Module Pattern

12. Observer Pattern

For explanation of all patterns, take a look at this article

Leave a Reply

Your email address will not be published. Required fields are marked *