Widgets are useful components that you can use in your Magento hosting to accentuate the site. For instance, you can add an Orders and Returns segment to the online store which your users can operate to see their accounts. Some modules will come with these widgets depending on what the tool is supposed to provide.

 

Installing widgets is a bit more complicated than it is in other content management systems. However, it’s not too difficult to add various functionality. For example, perhaps you want to install a widget that allows people to sign up for your newsletters.

 

In today’s tutorial, I’m going to show you how to install widgets in Magento 2. It’s a bit different than earlier versions of the application but similar in how these are added.

 

Adding a New Widget

Go to the Content section of Magento and click “Widgets”.  This screen will show you all the different widgets you may have installed including the type and design it will use. Click the “Add Widget” button on the top right of the screen.

 

Here is where you will set the type of widget and its theme. Depending on the type of widget, you can make its appearance different from the overall view of the website. Click the drop-down for “Type” and select the widget you want to install. I am adding an “Orders and Returns” widget, so that is what I am choosing.

 

Click the drop-down for “Design Theme” and choose a template you want to use. Currently, I only have two installed. I am simply going to pick the Magento Luma for this tutorial. However, you can install different themes for Magento and use them for various areas of your website.

 

Click the “Continue” button to proceed. This will bring up the Storefront Properties for your widget. You may have different settings available depending on what you’re adding to Magento. Once you’re done making changes to your widget, click the “Save” button.

 

The only reason why I don’t go deeper into the settings is that each widget is different. I would have to create a whole tutorial surrounding each specific component that you’ll have available.

 

However, it is important that you pay attention to any Layout Updates you may have. In the Layout Updates area, you can adjust where the widget is displayed. This may be exceptionally useful if you only want the specific widget to show on certain parts of your site.

 

You may also want to pay attention to the container in which you’re adding the widget. The container is the block of your website that will hold the widget in place. As you can see from my example, I’ve placed the Orders and Returns widget to show on all pages in the main sidebar of the site.

 

Refreshing the Cache

After installing or saving a widget, you may have to refresh your site’s cache. This is so the site remains fast and efficient with updated information. Click on the Cache Management link that appears in the message. Perhaps the easiest way to perform the cache update is to simply select all of the components at once and update everything. You don’t have to, but it’s the quickest way. Otherwise, you can select each block individually for invalidated files.

 

Click the “Flush Magento Cache” button on the top right. Now, your website is ready with the new widget and updated caching of your pages.

 

When you start an online store with Magento, you have many options to customize the appearance. Whether it’s for form or functionality, widgets can do a lot of good for your website. Find components that your guests may appreciate and focus on providing a superior experience. How your store performs online can be as vital as various marketing tools you use to engage the audience.

Cette réponse était-elle pertinente? 0 Utilisateurs l'ont trouvée utile (0 Votes)