Yearly Archives: 2020
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]
The etc/adminhtml/menu.xml file is used to control the Magento 2 admin panel menu and add new items to it, in particular.
In the previous article 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 module 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>
If you want to take your store to the next stage and create a multi-language 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 switch languages.
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
In the previous article 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 your module folder:
etc/acl.xml
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
To add a new table to the Magento 2 database, you need to create a file in the module 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();
}
}
Since you already know how to create first controller in Magento 2 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
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.
To create basic Magento 2 module you need only 2 files: module.xml and registration.php.
1. Firstly, create the module's folder:
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.
Once you assign attributes to the attribute sets, 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 Magento 2 Extended Product Grid Extension.
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 filter products by category 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
Managing products and updating their attributes has never been so quick and easy as with the Magento 2 Extended Product Grid — an extension that helps you to edit product information directly from the grid.
With this module, you do not have to go from one product page to another endlessly, changing the price, quantity, attribute sets, SKU, etc.
Why do you benefit from Extended Product Grid? See for yourself.
Following steps to configure Magento 2 Extended Product Grid:
1. Go to Stores > Configuration > Magefan Extensions > Product Grid Inline Editor and Enable the extension.
Magento 2 Enhanced Product Grid has a lot of features. So let's see what it enables you to do in the product grid.
2. Navigate to Catalog > Products to start updating product attributes.
3. Click on the Product to see the editing form appear. Change the attribute value press Save.
4. Tick multiple Products to update product attributes in bulk. Set the value in a corresponding field and press Apply > Save Edits
Although Magento enables you to create multiple product attributes, 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 Magento 2 Extended Product Grid — 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
Magento is one of the biggest eCommerce platforms available nowadays. It is a complex unity of processes, actions, and sections managing which could be daunting, especially for one person.
Regardless of who you are: store owner or web developer it is always important to remember to optimize the management process and time-saving.
If you are one of those who are looking for the ways to save more time working with Magento 2 this article is right for you.
Article Contents
Is it worth having an eCommerce business?
3 Effective Time-Saving Tips for Magento 2 stores
Is it worth having an eCommerce business?
It does not matter what you do and what your business is, there always comes the moment when you start thinking “Is it worth it?”. At some point, it gets harder and you feel like going in circles, staying at one place, not growing.
This is the common thing for people in online business.
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 products, 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 Magento 2 Enhanced Product Grid 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
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 Magento 2 blog posts automatically using the Mailchimp, all-in-one Email Marketing Platform.
Optimizing images is one of the first steps to website performance improvement. The best way to do that is to convert images to the modern WebP format with the Magento 2 WebP Images extension. WebP images are smaller in size from traditional .png and .jpg formats and that makes them load faster.
However, sometimes there might be images you want to exclude from the WebP conversion.
You have converted images to WebP format manually or just want some <img> tags to be ignored during WebP conversion? Please, add the data-webpconverted="1" attribute to the <img> tag as in the example.
Example:
<img src="image.jpg" /> —> <img src="image.jpg" data-webpconverted="1" />
Thus, once you add this attribute to the <img> tag, images containing it will be ignored during the page parsing and images conversion.
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 customizing your Magento admin colors or changing logos 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 Magento 2 Admin View 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
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 change the Magento 2 admin logos. 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. Magento 2 Admin View 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
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 Magento 2 Admin View 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.
If you decided to remove Magento 2 Admin View Extension, 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:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Note: if you don't want your website to be down during deployment, try these zero downtime deployment commands for Magento 2.
Remove Extension Data (optional)
Attention! This will clean all Admin