A stylized magnifying glass and the text ‘Your Questions, Answered’ on a soft blue gradient background

Magento FAQ

Wondering if Magento is the right choice for your e-commerce needs? Confused about how to navigate its installation or perform essential tasks like reindexing and exporting products? Look no further! 

In this blog, we'll dive into common questions about Magento, simplifying complex concepts and providing straightforward answers.

16 min read

Is Magento worth it?

Absolutely. Firstly, Magento is highly adaptable, ensuring you never have to wonder what to do when your business starts breaking new revenue records and attracting more customers. Whether you're a startup or an established company looking to switch from a platform that can't keep up, Magento grows with you seamlessly.

This platform boasts exceptional flexibility, capable of meeting virtually any business need imaginable. You can craft integrations with custom-developed applications or easily implement sophisticated business flows.

Key features include:

  • Adaptability to any business's needs
  • Advanced customization options
  • Open-source nature, offering unrestricted access to the source code
  • High scalability and agility
  • Merchant-focused admin panel for streamlined management
  • Exceptional user experience
  • Mobile optimization for seamless performance across devices
  • SEO-friendly architecture
  • Multilingual capabilities
  • Support for multiple currencies
  • Diverse shipping options
  • Seamless integration with third-party services
  • Robust reporting and analytics tools
  • Extensive marketplace of extensions and plugins, supported by a large and active developer community

With Magento, you're not just investing in a platform; you're gaining a powerful tool that evolves alongside your business, empowering you to adapt, innovate, and thrive in an ever-changing market landscape.

How to install Magento/Adobe Commerce?

To install Magento or Adobe Commerce on self-hosted infrastructure, follow these steps:

Prerequisites:

- Ensure you meet all system requirements and complete prerequisite tasks, including server specifications, PHP version, and database requirements. Refer to the official Adobe Commerce or Magento Open Source documentation for detailed information.

Installation Steps:

1. Install Composer:

Composer is a PHP dependency manager necessary for installing Magento and its dependencies. Follow the Composer installation instructions for your operating system.

2. Get Authentication Keys:

Obtain authentication keys to access the Adobe Commerce Composer repository. Refer to the Adobe Commerce documentation for more information.

3. Log in as File System Owner:

Access the application server or switch to a user with permissions to write to the file system. This user will execute installation commands.

4. Set System PATH:

Add `/bin` to your system PATH to run CLI commands from any directory easily.

5. Get the Metapackage:

  • Log in to your application server as the file system owner.
  • Navigate to the web server's document root directory or any directory configured as a virtual host document root.
  • Create a new Composer project using the Adobe Commerce or Magento Open Source metapackage.

6. Set File Permissions:

Before installing Adobe Commerce or Magento Open Source, set read-write permissions for the web server group to allow writing files to the file system.

7. Install the Application:

Use the command line to install Adobe Commerce or Magento Open Source. 

Here are some key commands:

  • ` magento setup:install `: Installs the application.
  • ` magento setup:uninstall `: Removes the application (if installed).
  • ` magento setup:upgrade `: Updates the application.
  • ` magento maintenance:{enable/disable} `: Enables or disables maintenance mode.
  • ` magento setup:config:set `: Creates or updates deployment configuration.
  • ` magento module:{enable/disable} `: Enables or disables modules.
  • ` magento setup:store-config:set `: Sets storefront-related options.
  • ` magento setup:db-schema:upgrade `: Updates the database schema.
  • ` magento setup:db-data:upgrade `: Updates the database data.
  • ` magento setup:db:status `: Checks if the database is up to date.
  • ` magento admin:user:create `: Creates an administrator user.
  • ` magento list `: Lists all available commands.
  • ` magento help `: Provides help for specified commands.

Follow these steps to successfully install Magento or Adobe Commerce on your self-hosted infrastructure.

Magento how to reindex

To initiate a reindex in Magento, follow these steps:

  1. Log in to the Magento Admin Panel.
  2. Navigate to System > Index Management.
  3. On the left, select the categories you want to reindex. To reindex all categories, click "Select All".
  4. From the Actions drop-down list, choose "Reindex Data" and then click "Submit".
  5. Depending on the number of categories and the amount of data, the reindexing process could take minutes or even hours. If it doesn't complete, consider using the command line method.

For the command line method:

  1. You'll need SSH access. Log in to your server using the provided SSH credentials.
  2. Navigate to your Magento installation directory, for example:

     
    Terminal window
    cd /home/demo/demosite.com/html/
  3. Once inside the Magento directory, go to the shell directory:

     
    Terminal window
    cd shell
  4. To check the current status of the Magento indexer, run:

     
    Terminal window
    php indexer.php --status
  5. To reindex all categories, use the command:

     
    Terminal window
    php indexer.php --reindexall
  6. You can also see a list of specific categories available for reindexing by running:

     
    Terminal window
    php indexer.php info

Magento how to export products in CSV

Exporting products from Magento 2 to CSV is a simple process that can be done directly from the admin panel. 
Here's a step-by-step guide:

  1. Log in to Magento 2 Admin:

    Access your Magento 2 admin panel using your credentials.

  2. Navigate to Export Section:

    From the admin panel, go to "System" > "Data Transfer" > "Export."

  3. Select Entity Type and Export Format:

    In the export section, choose "Products" as the entity type. Then, select "CSV" as the export file format.

  4. Configure Export Settings:

    Optionally, you can tick the "Fields Enclosure" option to enclose special characters in double quotes.

    Apply attribute-wise filters in the Entity Attribution section if needed. You can also choose to exclude certain products matching filters.

  5. Initiate Export:

    After configuring export settings, click the "Continue" button to start the export process.

  6. Confirmation and File Location:

    A success message will be displayed, confirming the export. The Magento 2 products export will be processed during the next cron job. 

    By default, all exported files are saved in the `/var/export` folder.

    By following these steps, you can effortlessly export products from Magento 2 to CSV, enabling easy data transfer and manipulation for your store.

What is the scope in Magento?

In Adobe Commerce and Magento Open Source installations, the concept of scope determines the level in the hierarchy where a database entity, content element, or configuration setting applies. This hierarchy comprises websites, stores, and store views, with each having parent/child relationships.

Here's how the scope works:

1. Hierarchy Structure:

  • Each installation can have multiple websites.
  • Each website can have multiple stores.
  • Each store can have multiple store views.

2. Scope Assignment:

  • Configuration settings, database entities, and content elements are assigned a specific scope within this hierarchy.
  • The scope determines where the setting or entity applies.

3. Scope Types:

  • Global Scope: Applies universally throughout the system. For example, postal codes have a global scope as they are used uniformly.
  • Website Scope: Applies to all stores and store views within the website hierarchy.
  • Store View Scope: Allows settings to be customized for each store view, typically used for multilingual support.

4. Implementation:

  • Configuration settings often display their scope below the field label, particularly in installations with multiple websites, stores, or views.
  • Users need to choose the appropriate store view before making changes to ensure the settings apply correctly within the desired scope.

In summary, the scope in Magento determines where configuration settings, database entities, and content elements apply within the website, store, and store view hierarchy, allowing for tailored configurations and multilingual support when necessary.

What is the maintenance mode in Magento?

In Adobe Commerce, maintenance mode is utilized to disable bootstrapping, providing a helpful means to maintain, upgrade, or reconfigure your site. Before enabling or disabling maintenance mode, you must first install the application. 

Use the following Magento maintenance CLI commands to manage maintenance mode:

To enable maintenance mode:

 
Terminal window
bin/magento maintenance:enable [--ip=<ip address> ... --ip=<ip address>] | [ip=none]

To disable maintenance mode:

 
Terminal window
bin/magento maintenance:disable [--ip=<ip address> ... --ip=<ip address>] | [ip=none]

To check the current status of the maintenance mode:

 
Terminal window
bin/magento maintenance:status

The `--ip=` option allows you to exempt specific IP addresses from maintenance mode, such as developers performing maintenance tasks. You can exempt multiple IP addresses by using the option multiple times in the same command.

What is a credit memo in Magento?

A Credit Memo is a unique numeric identifier assigned when a request for a credit memo is submitted. It serves as a document indicating the amount owed to the customer for a full or partial refund. This refunded amount can either be applied toward future purchases or refunded directly to the customer. 

Before a credit memo can be printed, it must be generated for the specific order. The Credit Memos page within the system lists all issued credit memos to customers. You have the option to print a credit memo for a single order or for multiple orders as a batch, depending on your requirements. 

In summary, a Credit Memo plays a crucial role in managing refunds and credits within the system, providing clarity on the amount owed to customers and facilitating smooth transactions.

Where is the exception log in Magento

In Magento, the error log keeps track of any problems that happen while the system is running. When you're working in developer mode, errors show up right away on the screen. But in production mode, they don't.

Sometimes, things might go wrong without you noticing. Or you might see a vague message like "An error occurred" without any details. That's when you need to check the error logs.

In Magento 2, the error log is always on, so you don't need to turn anything extra on. 

There are three main types of logs:

  1. exception.log: This records unexpected errors that mess up how Magento works.
  2. system.log: It keeps track of general problems with Magento.
  3. debug.log: This one is for developers and shows details about how Magento is running, like events and database queries.

Checking these logs helps you find and fix issues in Magento, keeping everything running smoothly.

Magento 2 error logs are stored in the var/log directory by default. You can access them easily using FTP. Simply connect to your server via FTP, navigate to the var/log directory, and download the corresponding error log file to check it. Alternatively, you can review the logs directly within the directory using your FTP user. 

If you prefer using the command line, you can access the var/log directory by using the command: `cd var/log`. This allows you to view the error logs directly from the command line interface. 

To view the contents of the error log file, you can use the `cat` command. For example:

 
Terminal window
cat {error-log-file-name}

Sometimes, error log files can be quite large. In such cases, you can use the `tail` command to view only the last few lines of the file. For example:

 
Terminal window
tail -n {number-of-lines} {error-log-file-name}

This command will display the specified number of lines from the end of the error log file.

How to add JavaScript in Magento?

There are several methods to add custom JavaScript to Magento 2, leveraging libraries like RequireJS and KnockoutJS to enhance page speed and manage dependencies. 

Let's break down the process of creating and implementing custom JavaScript in Magento 2:

Method 1

Using data-mage-init Attribute

This method allows you to target specific HTML elements and is commonly used for jQuery UI widgets. Here's how to implement it:

 
<div class="example-class" data-mage-init='{"customjs": {}}'>Custom div</div>

Method 2

Using script Tag

Sometimes, you may need to pass multiple parameters to your module. In such cases, the `type="text/x-magento-init"` approach can be useful. Here's an example:

 
<script type="text/x-magento-init">
   {
       "*": {
           "Magento_Custom/js/customjs": {
               "param1": "Value1",
               "param2": "Value2"
           }
       }
   }
</script>

You can then retrieve these parameters in your custom JavaScript file:

 
define([], function () {
   'use strict';
   return function(config) {
       console.log(config);
       console.log(config.param1);
       console.log(config.param2);
   }
});

Method 3

Adding JavaScript with Layout Files

This method eliminates the need to define custom JavaScript in the `requirejs-config.js` file. Here's how to implement it:

  1. Create `default_head_blocks.xml` at `app/design/frontend/Vendor/Theme/Magento_Theme/layout/` and add the following code:

     
    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
       <head>
            <script src="Module_Theme::js/custom.js" />
       </head>
    </page>
  2. Paste the following code into your `app/design/frontend/Vendor/Theme/Magento_Theme/web/js/custom.js` file:

     
    require([], function() {
       alert("My Custom Js Code");
    });

With these methods, you can seamlessly integrate custom JavaScript functionality into your Magento 2 store.

Where is the config.xml in Magento?

In earlier versions of Commerce, the responsibilities of the config.xml configuration file have been divided among several files located in various module directories. Instead of having a single config.xml file, multiple configuration files are now used, each serving a specific purpose and located in different module directories.

These configuration files, also known as configuration types, are loaded on demand only when a module requests a specific configuration type. They allow you to customize specific aspects of your module's behavior.

Furthermore, multiple modules can declare configuration files that affect the same configuration type, such as events. When this happens, these multiple configuration files are merged together, ensuring cohesive behavior across modules. 

In this context, the following terms are commonly used:

  1. Configuration Object: Refers to the Commerce library or class responsible for defining and validating the configuration type. For instance, the configuration object for config.xml is Magento\Framework\App\Config.
  2. Configuration Stage: Configuration stages include primary, global, and area. Each stage determines when a configuration type is loaded and merged with other configuration types of the same name. For example, module.xml files are merged with other module.xml files.
  3. Configuration Scope: In conjunction with configuration stages, a scope defines the configuration type model. For example, adminhtml is an area scope that is loaded with other modules' adminhtml configurations at the corresponding stage.

When working with configuration files in Magento, you can interact with them using interfaces provided under the Magento\Framework\Config namespace. These interfaces are useful when creating a new configuration type or working with existing configurations.

Here are the key interfaces provided by Magento\Framework\Config :

  1. ConverterInterface: This interface converts XML files into an in-memory array representation of the configurations.
  2. DataInterface: Used to retrieve configuration data within a specified scope.
  3. FileResolverInterface: Identifies the location of files to be read by Magento\Framework\Config\ReaderInterface.
  4. ReaderInterface: Reads configuration data from storage, selecting the storage method (file system, database, etc.), merging configuration files according to merging rules, and validating configuration files against validation schemas.
  5. SchemaLocatorInterface: Locates the XSD schema associated with configuration files.
  6. ScopeListInterface: Returns a list of available scopes.
  7. ValidationStateInterface: Retrieves the validation state of configuration files.

These interfaces provide a standardized way to interact with configuration files, ensuring consistency and flexibility when managing configurations within the Magento framework.

Magento where is di.xml?

The di.xml file, also known as the Dependency Injection configuration, determines which dependencies are injected by the object manager. Additionally, it allows you to specify sensitive configuration settings.

Here's what it entails: Each module can possess a global di.xml file as well as area-specific ones. When the application runs, it collects all di.xml configuration files declared in the system and merges them together by appending all nodes.

As a guideline, area-specific di.xml files should handle dependencies for the presentation layer, while a module's global di.xml file should handle the remaining dependencies.

The application loads the configuration in the following order:

  1. Initial ( app/etc/di.xml )
  2. Global ( /etc/di.xml )
  3. Area-specific ( /etc//di.xml )

The available areas are:

  • adminhtml
  • frontend
  • graphql
  • webapi_rest
  • webapi_soap
  • crontab

During bootstrapping, each application entry point loads the appropriate di.xml files for the requested area.

Type configurations describe an object's lifecycle and instantiation method. You can configure the type in your di.xml configuration node in the following ways:

In Magento, you can find the di.xml file in different locations depending on whether it's globally applied or specific to an area:

Globally:

 
<Vendor>/<Module>/etc/di.xml

Area-specific:

 
<Vendor>/<Module>/etc/<area>/di.xml

Where:

  • Vendor: Module Vendor (e.g., Magento)
  • Module: Module name (e.g., Catalog)
  • Area: Magento area code (e.g., adminhtml)

Configuration will be global if the area is omitted.

For example, if you're working with a module named MyModule by a vendor named MyVendor in the adminhtml area, you'd find its di.xml file at:

 
app/code/MyVendor/MyModule/etc/adminhtml/di.xml

Magento for payments

Magento now offers quicker pay options like PayPal, Apple Pay, and Google Pay right at the start of checkout in its latest version, Magento 2.4.7. For logged-in customers, it's even more convenient. They can save their payment info for future purchases, cutting down on checkout steps.

With PayPal, they can store new cards and PayPal accounts. Google Pay and other options are also streamlined for repeat purchases. Plus, there's extra security with 3DS verification for Google Pay non-tokenized cards.

Magento is frontend or backend?

Magento, whether version 1 or version 2, offers clear ways to separate frontend and backend tasks.

Backend developers typically handle:

  1. Upgrading core files with new PATCH releases.
  2. Installing and configuring extensions to fulfill client requirements.
  3. Adhering to Magento best practices while modifying existing logic.
  4. Developing new modules for integrations with ERP, OMS, Invoicing, Stock, Pricing, or other e-commerce-related functionalities.
  5. Assisting frontend developers by creating classes, structuring data more effectively, and providing easier methods for integration.

Frontend developers, on the other hand, are responsible for:

  1. Altering the site's appearance and user experience, which involves working extensively with CSS, JavaScript, and PHTML files.
  2. Implementing JavaScript plugins to enhance website functionality.
  3. Collaborating with backend developers to leverage client browsers for additional tasks.

Both roles require a deep understanding of Magento's theme model, layout structure, and proficiency in working with .phtml files.

Magento as a CMS?

Magento is often regarded as a content management system (CMS) due to its robust content management capabilities. While its primary focus is on fulfilling e-commerce needs, Magento offers extensive functionalities beyond traditional online stores.

Some of Magento's distinctive features include:

  • MVC model architecture for organized development.
  • Built-in content management systems.
  • SEO optimization tools to enhance online visibility.
  • Dedicated B2B (business-to-business) features for wholesale operations.

So, can you use Magento as a CMS? Absolutely! Its flexibility and features make it a great choice for businesses wanting both e-commerce and solid content management.

Magento with elastic search or open search?

Elasticsearch is crucial for Magento, especially since Magento 2.4—it's a must-have for installation. 

Magento OpenSearch is a free and open-source tool, similar to Elasticsearch. It's versatile, serving various purposes from search engines to data analysis. OpenSearch was born as a response to changes in Elasticsearch's licensing, starting as a fork of Elasticsearch 7.10.2 and Kibana 7.10.2.

If you're happy with Elasticsearch, you might not need OpenSearch. But, let's look at the key differences:

  • Elasticsearch is now licensed under the SSPL and Elastic licenses, losing its open-source status. This means anyone offering Elasticsearch functionality to a third party must share the entire source code and necessary APIs. On the other hand, OpenSearch is licensed under Apache 2.0, making it freely available for public use.
  • Both have active communities, but Elasticsearch has had more commits on GitHub recently. Additionally, OpenSearch had to remove non-Apache 2.0 code, impacting some features. However, plugins/connectors can replace these capabilities.
  • While both offer security features, some are only available on Elasticsearch to paying customers.
  • In performance testing by TechTarget’s Enterprise Strategy Group, Elasticsearch proved 40-140% faster than OpenSearch while using fewer resources.
  • Both can be self-managed for free, but cloud usage is common. Elastic Cloud starts at $95+/month, while AWS offers OpenSearch Service under the AWS Free Tier.
  • OpenSearch users access the full feature set, whereas some Elasticsearch features require Gold, Platinum, or Enterprise subscriptions.

Magento and PHP

Magento is an open-source e-commerce platform written in PHP, the most popular scripting language primarily used for web applications. Many website developers prefer PHP due to its simplicity, affordability, flexibility, scalability, and more. PHP is supported by a vast community with a substantial standard library.

A PHP framework is a library of code containing pre-packaged functions, classes, and elements for rapid application development. The framework enables PHP developers to build software more efficiently by eliminating the need to reproduce repetitive code. Moreover, relying on a framework enhances code readability and comprehensibility for other developers working on the same project. However, it's advisable to consider the platform as an independent system rather than relying solely on the framework used.

Magento and Salesforce integration

Magento and Salesforce integration involves connecting the Magento e-commerce platform with Salesforce's customer relationship management (CRM) system. This integration enables seamless communication between the two systems, allowing for the sharing, transfer, and extraction of data and records.

To integrate Salesforce CRM with Magento 2, you'll need an existing Salesforce account. Keep in mind that additional fees may apply, as the price of the integration extension does not cover the cost of using Salesforce CRM itself, which typically starts at $25 per month.

While integration extensions are available for self-setup, opting for professional assistance ensures a smooth integration process without risking data loss or interruptions to your online store.

To sum up 

We hope this article has provided you with some helpful insights. At first glance, Magento may seem complex and intimidating, but its functionality offers opportunities to create a unique online presence and a more engaging brand image. This can attract your ideal customers effectively.

If you have specific questions about your Magento website or would like to schedule a consultation, please don't hesitate to reach out to us. And, if you have any new ideas for blog topics that you'd like us to cover, we'd love to hear from you too.