Magento 2 Backend Exploration: Widgets

- E-Commerce, Magento 2, Our extensions

Magento 2 widgets

The following guide sheds light on the structure of the Magento 2 backend. In particular, we explore a screen that contains all Magento 2 widgets. It is a part of the Content section, together with Pages and Blocks. Below, we describe how the Widgets grid looks and works. We also shed light on how to create widgets as well as import and export them.

Magento 2 Widgets

You can find all CMS pages, blocks, and widgets under Content-> Elements. While each content type has a grid, the content we are going to describe below is available under Elements -> Pages.

 Magento 2 widgets

Magento 2 Widgets

A grid with all widgets offers minimum control elements: search field in each column + pagination. No mass actions or custom grid views are available. The default view offers the following five columns: 

  • Widget ID – each widget has an ID number;
  • Widget – and a name;
  • Type – there are several different types of widgets;
  • Design Theme – each widget is related to a particular design theme;
  • Sort Order – to avoid conflicts between widgets.

 Magento 2 widgets

How to add a Widget in Magento 2

To add a new Magento 2 Widget, hit the “Add Widget” button on the top right:

Magento 2 widgets

You are redirected to a section with settings. Select a widget type and design theme. Hit “Continue.”

Magento 2 widgets

Next, configure Storefront Properties: add a widget title, assign it to a store view, specify a sort order, and add a layout update.

Magento 2 widgets

In Widget Options, select a block. When everything is configured, hit the “Save” button.

Magento 2 widgets

How to edit a widget in Magento 2

To edit an existing widget in Magento 2, go back to the Widgets screen and double-click on an item you want to change. You can edit the same fields we’ve just described above. 

How to Import Magento 2 widgets

Now, let’s see how to import widgets to Magento 2. We recommend you to use the Improved Import & Export extension since it dramatically simplifies the process and automates all transfers. The module is designed to enable the import of widgets from any external systems.

Everything you need is available under System->Improved Import/Export->Import Jobs. Here, click “Add New Job” to create a new import job. Configure the following sections of settings.

 Magento 2 widgets import

The General Settings tab lets you enable your new import job, specify its title, and add a schedule of transfers. To import widgets to Magento 2 only one time, leave this field blank. In case you need recurring transfers, create a plan. Next, you can choose a language (locale) and enable/disable unique URL generation, re-index, email notifications.

 Magento 2 widgets import

You can choose widgets as your import entity under the Import Settings section. This tab also lets you enable/disable API synchronization and select a platform to import data from. It means that you can choose and apply a mapping preset. We describe this feature below.

 Magento 2 widgets

The Import Behavior tab offers the following options: Add/Update, Replace, or Delete. This is how the extension will import widgets. Next, choose a validation strategy, set a maximum number of errors, and type separators.

 Magento 2 widgets import

The Import Source section lets you choose the format of your import file as well as an import source: server, Google Sheet, URL, direct upload, or Dropbox. 

 Magento 2 widgets import

Hit “Save & Run” when all options are configured and import widgets to Magento 2. More information is available here:

Get Improved Import & Export Magento 2 Extension

How to Export Magento 2 Widgets

When it comes to the export of Magento 2 widgets, Improved Import & Export also becomes useful. Like in the case of the corresponding import process, it both simplifies widgets export and automates all further data transfers if necessary.

You can start the new export by clicking “Add New Job” under System->Improved Import/Export->Export Jobs.

 Magento 2 widgets export

Enable the new export job and specify its title. Next, choose the frequency of exports. Leave the field empty if a single procedure is required. You can also specify a file language and divide additional attributes under the General Settings tab. 

 Magento 2 widgets export

As for Export Settings, you can set Magento 2 widgets as your entity here. Enable/disable ‘Consecutive Export’ if necessary

 Magento 2 widgets

Select a file format required by an external system and specify separators a system you provide data to utilizes.

 Magento 2 widgets export

Proceed to the Export Source tab and select a final destination: FTP, SFTP, or a data file. Check the connection.

 Magento 2 widgets export

Map attributes and specify filters to make the data output more suitable for the third-party system.

 Magento 2 widgets export

Click “Save & Run” when finished. Now, the extension lets you export Magento 2 widgets. You can find more details here:

Get Improved Import & Export Magento 2 Extension

Improved Import & Export Features

 Magento 2 widgets

The Improved Import & Export extension offers numerous advantages over third-party import/export solutions, not to mention the default transfer tools of Magento 2. Our module can transfer all possible entities to and from your e-commerce store, so widgets are only a small part of what our plugin does.

Automated Import & Export Processes

You can automate import and export processes while transferring widgets with Improved Import & Export. Our module offers two different ways of moving data automatically. You can find them described below.

Schedules

Schedules were described earlier in this article. They represent the first way of automation. The Improved Import & Export module utilizes the default cron syntax for both import and export processes, allowing you to automate all data transfers entirely. Select a predefined interval or specify a custom one. It is also possible to create a profile with no schedule like in the example above. Leverage a manual launch any time you need to transfer data related to a job asynchronously.

 Magento 2 widgets

Events

Event-based triggers will also help you automate integrations with external systems. They represent the second way of data transfer automation, enabling real-time updates. Select a trigger that launches data transfers, synchronizing two systems right after a specific action takes place. It means that you can start the export of widgets from Magento 2 right after a new block is generated. You can find more information here: How to Run Magento 2 Import or Export After Specific System Event or Process.

Advanced Mapping Features

Due to different standards for storing data that most e-commerce systems and related platforms have, you cannot freely transfer information between them. Merchants are forced to edit every data file before moving it into Magento 2. The same situation is typical for export processes. You should edit data files created on your e-commerce website according to the requirements of a platform you want to connect your store with. Such processes take lots of time unless you use Improved Import & Export. The module lets you apply all changes right in the backend section. Furthermore, you can do that in just a few clicks. Let’s see how the extension helps.

Mapping Presets

With Improved Import & Export, you get a bunch of mapping presets – predefined schemes that let you replace third-party attributes with ones used internally within a few clicks. Since our module does all the other work for you, it is only necessary to select a proper solution while configuring a new job. The extension scans the input data for third-party attributes and replaces them with the internal ones. The same approach is applied to export processes: the extension automatically changes Magento 2 attributes, replacing them with ones utilized within an external platform. From the perspective of an administrator, everything looks as follows:

 Magento 2 widgets

Matching Interface

If the necessary preset is absent, you can use a matching interface of the Improved Import & Export Magento 2 extension. You can find the section in every import and export profile. To solve the issue of different attribute standards, you have to follow these three simple steps:

  1. select an entity, 
  2. choose a system attribute, 
  3. specify a corresponding external designation. 

This gif image shows how everything works:

 Magento 2 widgets

You can also add hardcoded (default) values, providing all imported items with the same values for the selected attribute. Let’s imagine a situation when you import products from different store views. Our extension lets you move them to the same store view by providing a hardcoded value.

Filters

Use filters to narrow down the selection of data in an export file. To add a new filter, click ‘Add Filter’ and select an entity and a system attribute. Next, specify filtering parameters and create the desired output. The system lets you add as many filters as you need. Note that filter parameters may vary depending on the selected attributes.

 Magento 2 widgets

Attribute Values Mapping & Editing

Besides, Improved Import & Export provides the ability to map and edit attribute values in the Magento 2 backend. The module lets you effortlessly eliminate incorrect designations that prevent import processes in an interface similar to the one we described above. Choose a third-party attribute value and specify a corresponding internal one in front of it, making an import file suitable for Magento 2. You can find a more specific description of this feature here: Attribute Values Mapping.

You can edit attribute values in bulk when their mapping is not enough. Improved Import & Export provides the ability to add a prefix/suffix to multiple attribute values. You can also split or merge them, depending on your needs. Note that it is possible to combine these rules and apply them to numerous values in bulk. Attribute values editing is described in this article: How to Modify Attribute Values During Import and Export in Magento 2.

Category Mapping

As for category mapping, this feature enhances the default product import in the following way: it introduces the ability to replace third-party product categories with ones used internally. Though it won’t help you with Magento 2 widgets, the feature may reduce headaches related to product data transfers.

With category mapping, you can modify information from external catalogs right in the Magento 2 backend. Take a third-party product category and specify a replacement:

 Magento 2 widgets

When a necessary category is absent, create it on the fly. Choose a parent category and type a new name. That’s it! The procedure is described here: Category Mapping.

Attributes On The Fly

If your data file doesn’t have all attributes, it is no longer a problem. The Improved Import & Export module offers a feature that fixes this issue. It lets you create attributes on the fly, adding missing information to data files. Use this general form:

Attribute|attribute_property_name:attribute_property_value|…

We describe this procedure here: Product attributes import.

Extended Connectivity Options

Improved Import & Export introduces extended connectivity options that mainly expand the default data transfer opportunities of Magento 2. Let’s describe all the enhancements.

Multiple File Standards

While Magento 2 works with CSV only, Improved Import & Export lets you leverage XMLJSONODS, and Excel. Thus, you no longer need to convert everything into CSV and vice versa! 

Another notable improvement is related to file archives: the plugin can unzip compressed data automatically. As a result, there is no need to extract updates before transferring them to Magento 2.

Multiple File Sources

Support for numerous file sources is another essential improvement available with our extension. To make your data transfers flawless, it lets you streamline the following sources:

Alternative Ways of Import & Export

File transfers are not the only way of import and export. Our module also lets you leverage API connections and integration with intermediary services as more powerful types of connection. Of course, Magento 2 doesn’t offer anything like that by default.  

With Improved Import & Export, you can create direct REST API connections to transfer data between your website and any third-party systems. The module lets you leverage SOAP and GraphQL if necessary.

Alternatively, you can import data from such services as Google SheetsOffice 365 Excel, and Zoho Sheet. Our extension connects to them, transferring updates. Below, you can see an example of Google Sheets integration:

 Magento 2 widgets

Also, note that you can apply all the extension’s features to the alternative connection types. Besides, the Improved Import & Export plugin offers additional opportunities with support for WSDL and WADL.

The following video displays the module in action:

Final Words

You must admit that adding and editing widgets in Magento 2 is a simple task. Furthermore, you can turn their import and export into a piece of cake with Improved Import & Export. For further information about our module, follow the link below. Don’t hesitate to contact our support to discuss your unique business case and possible customizations:

Get Improved Import & Export Magento 2 Extension