cancel
Showing results for 
Search instead for 
Did you mean: 

Add widget to all products in a category automatically

Add widget to all products in a category automatically

There is no easy way to automatically add a widget to every product within a specific category.

 

Every time a new product is added, you have to go and edit the widget and add this new product to the list. Which becomes a problem when we are talking about 1000 of products.

 

The use case for this is a product type where we want a global instruction text for all these products within a specific category.

 

We do not want to include this text in every single product description, because we want to update it centrally on one location if needed.

2 Comments
maria_skula1
Contributor

Hello,
There is a solution actually. You are able to add the widget to all products in a category automatically using the CMS Display Rule. All you need to do is to create a rule and set the conditions, time period and customer group you want this widget to be visible to. Magento 2 CMS Display Rule extension allows you do to this. You don't' have to enable and disable the widget. You just need to create the CMS Display Rule which will do this for you according to the "instructions" (rules) you give him.

 

You can check this extension here: https://magefan.com/magento-2-cms-display-rules-extension

 

measureddesigns
Senior Member

Agreed it would be really useful to have this added to the core, so a cms block can be assigned to products within a category and displayed on the product page. Selecting all products within that category at that time is a longer query and likely to become outdated.

add-cms-block-to-products-in-category.JPG