100 Top MAGENTO Interview Questions and Answers

MAGENTO Interview Questions:-

1. Define What is Magento?

Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content, and functionality of their eCommerce store. Magento intuitive administration interface features powerful marketing, search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs. Designed to be completely scalable and backed by Various support network, Magento offers companies the ultimate eCommerce solution.

2. What is the difference between Mage::getSingletone() and age::getModel() in Magento

Mage::getSingletone() always finds for an existing object if not then create that a new object but Mage::getModel() always creates a new object.

3. Why Magento uses EAV database model?

In the EAV database model, data are stored in different smaller tables rather than storing in a single table. product name is stored in catalog_product_entity_varchar table product id is stored in catalog_product_entity_int table product price is stored in catalog_product_entity_decimal tableMagento Use EAV database model for easy upgrade and development as this model gives more flexibility to play with data and attributes.

4. How to upgrade to the latest version using Magento Connect?

Upgrading Magento to the latest version is a fairly simple task. Copy and Paste this key Magento-core/Mage_All_Latest VIA Magento Connect where it states Paste extension key to install. This will upgrade Magento to the newest version.

5. Define the Modules of Magento?

Magento supports the installation of modules through a web-based interface accessible through the administration area of a Magento installation. Modules are hosted on the Magento eCommerce website as a PEAR server. Any community member can upload a module through the website and is made available once confirmed by a member of the Magento team. Modules are installed by entering a module key, available on the module page, into the web-based interface.

There are three categories of modules hosted on Magento Connect:

  • Core Modules
  • Community Modules
  • Commercial Modules

Core and Community modules can be installed via the administration area. Commercial module pages provide price information and a link to an external website.

6. Define What technology used by Magento?

Magento uses PHP as a web server scripting language and the MySQL Database. The data model is based on the Entity-attribute-value model that stores data objects in tree structures, thus allowing a change to a data structure without changing the database definition.

7. What is MVC structure in Magento?

The Model-View-Controller (MVC) architecture traces its origins back to the Smalltalk Programming language and Xerox Parc. Since then, there have been many systems that describe their architecture as MVC. Each system is slightly different, but all have the goal of separating data access, business logic, and user-interface code from one another.

8. What is the benefit of a namespace (package) in Magento?

We can have more than one module with the same name but they should be placed in different namespaces. All Magento core modules are contained in mage namespace.

and all custom modules are placed in


9. How to include CMS block in template file(.phtml)?

Access block’s content from .phtml template file by :

echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘static_block_id’)->toHTML();

10. How to add an external javascript/css file to Magento?

skin_jsjs/ yourfile.js
skin_csscss/yourstyle. css

11. What are handles in magento (layout)?

Handles are basically used for controlling the structure of the page like which block will be displayed and where. First level child elements of the node are called layout handles. Every page request can have several unique Handles. The handle is called for every page. handle for products belongs to virtual product type, PRODUCT_TYPE_simple is called for product details page of simple product type and PRODUCT_TYPE_virtual is called for the virtual product detail page and customer_logged_in handle is called only if the customer is logged in. The muster_index_index handle is created by combining the frontName (muster), Action Controller (index), and Action Controller Action Method (index) into a single string and this handle will be called only when /zag/index/index URL is accessed.

12. Define What is in Magento?

The routers tag allow us to decide a front name for each module. The tag is defined in a config.xml file of the module. For Namespace_MyModule front name is module so the URL will be like :

  • standard
  • Namespace_MyModule
  • module

13. Which factors affect the performance of Magento?

  1. EAV structure of Magento database, even for retrieving single entity the query becomes very complex.
  2. Magento’s template system involves a lot of recursive rendering
  3. Huge XML trees built up for layout configuration, application configuration settings

14. How to improve Magento performance?

  • Enabled magento caching
  • MySQL Query caching
  • Enable Gzip Compression
  • Disable any unused modules
  • Disable the Magento log
  • Optimise your images
  • Combine external CSS/JS into one file
  • Enable Apache KeepAlives: Make sure your Apache configuration has KeepAlives enabled.

15. How to get the Total Price of items currently in the Cart?

helper(‘checkout’)->formatPrice(Mage::getSingleton(‘checkout/cart’)->getQuote()->getGrandTotal()); ?>

MAGENTO Questions Pdf Free Download ::

16. How to set different themes for logged in users?


17. How to create magento custom module?

Steps to create a custom Magento module:
Namespace: Zag
Module Name: Mymodule

  1. Create directory Mymodule in app/code/local/Zag
  2. Create Block, controllers, etc, Module directories. Create controller, block and module file as required.
  3. Create module configuration file (app/code/local/Zag/Mymodule/etc/config.xml).
  4. Create an xml file (app/etc/modules/Zag_ Mymodule.xml)to enable/disable the module and tell Magento system from which code pool that module will be taken.

18. How to set different themes for each store?

Go to: System>Designs
Then, add new design change or edit existing. You can select Store and Custom Design.

19. How to make a product’s custom attribute searchable in advance search?

Go to : Catalog > Attributes > Manage Attributes
Edit the attribute and select “Yes” for Use in Advanced Search.

20. How to fetch 5 bestsellers products programmatically?


  • addOrderedQty()
  • addAttributeToSelect(‘*’)
  • setPage(1, 5)
  • load();

21. Explain Magento’s MVC architecture

22. How Magento ORM works?

23. What is EAV in Magento?

24. Difference between Mage::getSingleton() and Mage::getModel()

25. Where is the relation between the configurable product and it’s simple product stored in the database?

26. How will you log the current collection’s SQL query?

27. How to get the first item or last item from the collection?

28. How to run custom MySql query in Magento?

29. How to include CMS block in template file(.phtml)?

30. How to add an external javascript/CSS file to Magento?

31. How to get the Total Price of items currently in the Cart?

32. What are handles in Magento (layout)?

33. How will you add/remove content from core’s system.xml file?

34. Can you have more than one Grid in a module?

35. How will you join the flat table and EAV table in Magento?

36. How will you enable maintenance mode of your Magento website?

37. What are “magic methods” in Magento?

38. How many database tables will Magento create when you make a new EAV module?

39. Where will you write your module’s business logic in Magento?

40. Explain different types of sessions in Magento (e.g. customer/session, checkout/session, core/session) and the reason why you store data in different session types?