Monthly Archives: 2020
- 2 min read
Menu Title [identifier]
Dashboard [Magento_Backend::dashboard]
Sales [Magento_Sales::sales]
Operations [Magento_Sales::sales_operation]
Orders [Magento_Sales::sales_order]
Invoices [Magento_Sales::sales_invoice]
Shipments [Magento_Sales::sales_shipment]
Credit Memos [Magento_Sales::sales_creditmemo]
Billing Agreements [Magento_Paypal::paypal_billing_agreement]
Transactions [Magento_Sales::sales_transactions]
Products [Magento_Catalog::catalog]
Inventory [Magento_Catalog::inventory]
Catalog [Magento_Catalog::catalog_products]
Categories [Magento_Catalog::catalog_categories]
Customers [Magento_Customer::customer]
All Customers [Magento_Customer::customer_manage]
Now Online [Magento_Customer::customer_online]
Marketing [Magento_Backend::marketing]
Promotions [Magento_CatalogRule::promo]
Catalog Price Rule [Magento_CatalogRule::promo_catalog]
Cart Price Rules [Magento_SalesRule::promo_quote]
Communications [Magento_Backend::marketing_communications]
Email Templates [Magento_Email::template]ihor
- 1 min read
The etc/adminhtml/menu.xml file is used to control the Magento 2 admin panel menu and add new items to it, in particular.
Create this file in folder, to add new menu element:
etc/adminhtml/menu.xml
and add the following code there:
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd"> <menu> <add id="VendorName_ModuleName::key1" title="Title 1" module="VendorName_ModuleName" parent="OtherVendorName_OtherModuleName::content" sortOrder="10" resource="VendorName_ModuleName::key1"/> <add id="VendorName_ModuleName::key2" title="Title 2" module="VendorName_ModuleName" parent="VendorName_ModuleName::key1" sortOrder="10" action="path/controllerName" resource="VendorName_ModuleName::key2"/> </menu></config>
id - a unique ;title - text of the element;module - defines what module the element belongs to;parent - identifier of the parent menu item;sortOrderihor
- 1 min read
In the we described how to create your own section on the Magento 2 configuration page (Stores > Configuration).
In order to set the default values for the configuration fields, you need to create the following file in the folder:
etc/config.xml
and add this code:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> <default> <section_id> <group_id> <field_id>default_value</field_id> </group_id> </section_id> </default></config>
The section_id/group_id/field_id hierarchy has to match the structure in the system.xml file.
To clear the cache, run the CLI command:
php bin/magento cache:clean
Check the result.
In the examples, we create a module for FAQ. The modified module code can be viewed on GitHub.
- 4 min read
If you want to take your store to the next stage and create a store, the first thing you have to cover is localization. Providing customers with content in their local language creates a personalized experience and encourages them to stay.
The Magento 2 translate inline tool is what can help you out with this task. It is available by default and convenient to work with. You can use it for your localization tasks to ensure relevant content is displayed after customers .
Today, we'll closely explore Magento 2 inline translation and determine whether it's worth it. We'll also cover other advanced tools to enhance your translation management.
So, shall we start?
What is Magento 2 Inline Translation?
The Magento 2 translate inline tool is a default Magento localization instrument that enables translation from the frontend. You can just hover over the interface element and add its translation right on the storefront.
It works best with short text elements, such as buttons and labels, andihor
- 2 min read
In the we explained how to configure and delimitate access rights for the Magento 2 admin panel users. In this article, you will learn how to create your own access rules (Role Resources).
You need to create ACL file (ACL - Access Control List) in the folder:
etc/acl.xml
add the following code there:
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> <acl> <resources> <resource id="Magento_Backend::admin"> <resource id="Magento_Backend::content"> <resource id="VendorName_ModuleName::key1" title="Title 1" sortOrder="10"> <resource id="VendorName_ModuleName::key2" title="Title 2" sortOrder="10" /> </resource> </resource> <resource id="Magento_Backend::stores"> <resource id="Magento_Backend::stores_settings"> ihor
- 2 min read
To find the Magento 2 configuration page navigate to Magento 2 Admin Panel > Stores > Configuration.
All tabs and forms on this page are customized using this file
etc/adminhtml/system.xml
that the majority of contains.
Add the following code to the system.xml file in your module to create your custom section:
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> <system> <tab id="tab_id" translate="label" sortOrder="110"> <label>My Tab</label> </tab> <section id="section_id" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> <class>separator-top</class> <label>My Section</label> <tab>tab_id</tab> <resource>VendorName_ModuleName::acl_path</resource> <group id="group_id" translate="label" type="text" sortOrder="10"ihor
- 4 min read
To add a new table to the Magento 2 database, you need to create a file in the folder:
app/code/<VendorName>/<ModuleName>/Setup/InstallSchema.php
add the following code to it:
<?php
namespace VendorName\ModuleName\Setup;
use Magento\Framework\Setup\InstallSchemaInterface;use Magento\Framework\Setup\ModuleContextInterface;use Magento\Framework\Setup\SchemaSetupInterface;use Magento\Framework\DB\Adapter\AdapterInterface;
class InstallSchema implements InstallSchemaInterface{ public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup();
//new table script will be there
$installer->endSetup(); }}
InstallSchema.php — is a file that is responsible for modifying the database structure during module installation. When executing the CLI command php bin/magento setup:upgrade Magento 2 checks whether a new module has appeared in the system and if it contains theihor
- 3 min read
Since you already know how to and to display the "Hello World" text on your own page, in this article we will show you how to display it in the new block.
1. Add a new PHP class block.
Create this file:
app/code/<VendorName>/<ModuleName>/Block/SomeName.php
and add the following code to it:
<?php
namespace VendorName\ModuleName\Block;
class SomeName extends \Magento\Framework\View\Element\Template{ public function getWelcomeText() { return 'Hello World'; }}
where,
SomeName is a random name in CamelCase format.\Magento\Framework\View\Element\Template — a class from which you inherit your own block that interacts with the template.getWelcomeText — a public method we created to return the text "Hello World". You can create a name for it yourself.
2. Add a template file (template .phtml file)
Create this file:
app/code/<VendorName>/<ModuleName>/view/frontend/templates/some-name.phtml
and add the following code there:
<h1><?php echo $block->escapeHtml($block->getWelcomeText())ihor
- 2 min read
To display "Hello World" on your own page in Magento 2, follow these steps:
1. Register a router for the storefront.
Create this file:
app/code/<VendorName>/<ModuleName>/etc/frontend/routes.xml
and add the following code there:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="standard"> <route id="VendorName_ModuleName" frontName="path"> <module name="VendorName_ModuleName" /> </route> </router></config>
You can use the developer name (VendorName) associated with the module name (ModuleName) as the router id. The frontName is used in the URL to access your controllers.
Both names have to be unique.
2. Create a controller.
Add the new file:
app/code/<VendorName>/<ModuleName>/Controller/Index/Index.php
add the following code in it:
<?php
namespace VendorName\ModuleName\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action{ihor
- 2 min read
To create basic Magento 2 module you need only 2 files: module.xml and registration.php.
1. Firstly, create the :
app/code/<VendorName>/<ModuleName>/
and the folder that will contain the module configuration files:
app/code/<VendorName>/<ModuleName>/etc/
If the app/code folder is missing from your Magento 2 installation, please create one.
2. Place the module.xml file with the following contents in the app/code/<VendorName>/<ModuleName>/etc/ folder
<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="VendorName_ModuleName" setup_version="2.0.0"> <sequence> <module name="Magento_Cms"/> <module name="Magento_Catalog"/> </sequence> </module></config>
sequence is not a required element and is intended to define the modules which your module depends on. If the dependencies are unknown, they can be specifiedihor
- 2 min read
Once you assign attributes to the , each product has a unique set of characteristics. However, when you need to change that you find that Magento doesn't offer any bulk option for that. You need to change the attribute set for each product, one by one. But not if you have the .
So, today you'll learn how to bulk change attribute sets for multiple products just in seconds.
To bulk change product attribute set in Magento 2:
1. Go to Catalog > Products and check all of the products you want to change the attribute set for, or choose the Select All option.
Note: you can and then change the attribute set for all products in a specific category.
2. Select Change Attribute Set from the Actions dropdown menu and choose the attribute set you want to change a current one to.
3. Confirm that you want to Change Attribute Set for selected products.
4. Check changed product attribute sets.
If you prefer to see how to bulk change attribute set in Magento 2, check this short video.
As youihor
- 2 min read
Although Magento enables you to create multiple , there is no option to edit their values in bulk. That's why it takes you a while to go from one product page to another and update them. But now if you know how to bulk edit product attributes in Magento.
You do not need to update any files or learn code editing here and now. All you need is — an extension that allows you to bulk edit product attributes directly from the products grid.
To bulk edit product attributes in Magento 2:
1. Go to Catalog > Products and click on one of the products you want to edit to see the editing menu.
2. Tick all products you want to update attributes for and change the attribute value in a corresponding field. Then press Apply.
3. Once you apply new values, you'll see them change as per your edits. However, for them to be saved you need to press the Save Edits button.
That's how you bulk edit product attributes in Magento 2. Just in a few clicks.
If you want to see how this actually works, check thisihor
- 2 min read
Originally, there is no filter products by category option in Magento 2 product grid. That is a little inconvenient making your search for specific products of some category when you want to update their information. It is not a big deal when you have a thousand , but what about several thousand?
Correspondingly, the product grid category filter saves a lot of time enabling you to sort products by category in seconds. In this article, you will learn how to filter products by category in the product grid with no code updating.
You simply need the that already has this feature. But the category filter is not the only feature you get with this extension.
Follow these steps to filter products by category in Magento 2 product grid:
1. Navigate to Catalog > Products and press the Filters button.
2. Choose the Category you want to filter products by in the category filter and get all products from that category listed in the grid.
So, what now?
You have filtered the productsihor
- 4 min read
Magento 2 blog is the best marketing tool you can use to attract more customers to your store, share some relevant information and gather loyal subscribers who strive to learn more about the experience shared in your blog posts. Content is king and it would be a crime not use it to its full extent to get more traffic.
By managing a blog on your Magento 2 store you create a community of followers. They share your idea and want to receive updates on the topics they are interested in on a regular basis.
Correspondingly, except for sharing your blog posts on social media, you need to consider emailing them to your subscribers. Having hundreds or thousands of blog subscribers it will be impossible to do it manually.
That is why in this article you are going to learn how to email your posts automatically using the Mailchimp, all-in-one Email Marketing Platform.
Before you start configuring your Magento 2 blog posts emails, you obviously need to set up an account on Mailchimp: fill out theihor
- 1 min read
Magento is an eCommerce platform that provides a lot of features for your store development. It also provides a convenient and comprehensive admin panel with all information you might need. Some of this information is the Copyright, Magento Version, and Legal Information in the footer, accessible from every page of the admin.
Sometimes you might want to remove that information from the footer when or to make a brandable admin panel. All of these together with removing admin footer info require no file or code updating. You can use the extension to make this a few-clicks process.
To remove admin footer information in Magento 2 take the following steps:
Navigate to Stores > Configruation > Magefan Extrensions > Admin View and find the Footer section.
Select whether to display Magento Copyright, Magento Version, and Magento Legal Info.
Once you Save Config, you will see the admin panel footer info will disappear and security notice about Account Activity will takeihor
- 2 min read
Magento admin panels look quite the same. However, that is definitely not what you want your business to look like.
To make your store admin as unique as your brand the first step would be to . If you have already done this, the next step would be to change admin color.
Most often Magento admin colors are changed only with some code adding or updating. module though, allows you to do this directly from the admin with no technical skills.
Isn't it convenient?
Following steps to change the color of the Magento 2 admin panel:
1. Go to Stores > Configuration > Magefan Extensions > Admin View > Color Schema.
2. Select Color Schema and Save Config.
So, it is that simple. You can change the color from the available ones and enjoy your unique admin. However, you're not limited to certain colors and can set your own choosing the Custom color schema.
4. Set colors for the Main Menu Background and Text together with their colors on Hover.
5. Customize Buttons color schema by setting the Primaryihor
- 2 min read
In order to build your brand awareness, you need to make sure it is represented in as many ways as possible. So wouldn't it be a great idea to change Magento 2 admin logo?
Every Magento 2 store admin panel looks almost the same. Thus, in order to make your Magento 2 store admin unique and brandable, we offer you to use the extension. It helps you to customize your admin design and, most importantly, change the admin logos with no code editing.
Following steps to change Magento admin panel logo:
1. Navigate to Stores > Configuration > Magefan Extensions > Admin View > Logos.
2. Upload the Main Logo and Menu Logo, then Save Config. The image formats available for you are JPG, GIF, and PNG.
Once you save the configuration you will see it appear on the Menu.
Note: if you would like to change any of the logos, just check the Delete Image select box and press the Save Config button.
The Main Logo on the login page will change as well if you set the image for it.
As you can see, Magentoihor
- 1 min read
If you decided to remove , please follow the steps below. You can contact our team for a free consultation in case you have any issues with Magefan's extension.
Remove Extension Files
Removing files instruction depends on the way the Admin View extension has been installed in.
1. If you can find the extension files in the folder
app/code/Magefan/AdminView
then remove this folder.
2. If the extension was installed via the composer and its files located in the folder
vendor/magefan/module-admin-view
then run composer CLI command to remove it
composer remove magefan/module-admin-view
Once extension files have been removed, run these Magento CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Remove Extension Data (optional)
Attention! This will clean all Admin View configurations.
1. Just in case please make a full backup (dump) of your Magentoihor
- 1 min read
If you need to update by Magefan, please follow the steps below.
Note: the updating instructions depend on the method the Admin Panel View extension was installed with.
Update using composer
If the Admin View module was installed via the composer (check if vendor/magefan/module-admin-view folder exists), then you need to run these simple CLI commands in Magento 2 directory:
composer remove magefan/module-admin-viewcomposer require magefan/module-admin-view ^x.x.x# replace x.x.x with the version you want to usephp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
Update using archive and FTP
If the Admin Panel module was installed via FTP (check if app/code/Magefan/AdminView folder exists), then follow these commands:
1. Download the latest version of the Admin Panel extension archive from magefan.com.
2. Extract archive.
3. Make the backup copy ofihor
- 1 min read
You can install by Magefan, using composer or archive installation methods.
Installation via composer (recommended)
Please navigate to your Magefan Account > Downloads > Install via Composer to get the composer installation instructions.
Installation using archive and FTP
Download Admin View Extension ZIP-Archive from magefan.com website (not GitHub or other sources).
Extract files.
Copy app folder from the archive to your Magento 2 folder.
In a command line, using "cd", navigate to your Magento 2 root directory.
Run CLI commands:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these .
- 9 min read
Managing a growing business can sometimes be quite challenging. However, by delegating responsibilities to different members of your team, you can make it less stressful.
Magento 2 user roles help with that. They allow you to grant users access to different sections of your backend. This not only declutters the space but also allows you to protect the admin from any unauthorised changes and improve .
So, in this guide, you will learn how to create Magento user roles and understand how to leverage them to your benefit.
What Are Magento 2 User Roles?
Magento user roles are permissions to access certain admin sections and functionality, restricted to certain admin users. They allow you to define what parts of your backend a user can view or modify.
This helps to avoid unauthorised changes, streamline the workflow, and protect sensitive data. It is important for delegating tasks, managing teams, and, of course, securing data.
However, let us give you a full picture of why the Magento user rolesihor
