Featured products in Magento 2 with Catalog Products List widget
April 17, 2018 | Write by opensource-services
By checking various e-commerce websites one thing which can be found in almost all of them are featured products. A list of hand-picked products, usually placed on the home page, used for promotion. So far Magento lacked that most requested feature and developers had to look for other solutions or to code one of their own. Let’s look what’s the situation like in Magento 2.
To finally sort this thing out, Magento 2 comes with a new widget that enables product selection based on condition based filters from various attributes and categories. If anyone has ever worked with Shopping Cart Price Rules this approach won’t be a new thing to them. Conditions can be created based on any combination of product attributes and categories where only products that are matched by the rule will be displayed.
What are the options for configuration?
Besides defining conditions, widget offers a few other options for configuration, like defining the title, enabling the pagination, template selection out of which a simple product list can be created. Defining conditions is a very nice feature which gives flexibility in product selection, rather than plain product selection (which can also be achieved by defining the condition by SKU attribute), but there’s a drawback of this approach. By defining conditions, and not the specific products, there’s not much what can be done with the output which is basically unknown until it’s displayed on frontend. One thing that most of us need and want is defining the order or sort of items in product list, which is not possible with this approach.
How to create one?
Well, there are two ways of doing that. The first way would be creating and including them as a part of the content of CMS blocks and pages (available in the admin are in Content > Elements > Pages/Blocks). In WYSIWYG editor there’s an Insert Widget button which allows their fast creation and inserting them on the place of the cursor in the content. Select Catalog Products List option from the dropdown and fill in the fields.
The other way is by creating them and inserting in the place of Layout Updates. Navigate to Content > Elements > Widgets and select the Catalog Products List as a type and your current design theme. Layout updates section allows a selection on which pages the widget will be displayed and in what part of the page.
Including the products list widget into Magento is a step forward, making development a bit easier with having such a feature already packed with the installation. Creating and including the product list widget is easy and fast and will definitely be used on many new websites for those who don’t really need a total control of the products list.
Let us know what you think! Make sure to ask for our