0

I am trying to find out how to get a list of products within a category that I can embed into a block - for example {{products category='safe-equipment'}}

I am new to Magento, so please give me the dumbed down version. Thanks!

1 Answer 1

0

Edit your block. In content section, click 'Insert Widget' button. Choose 'Catalog Products List' for type. Click last option, 'Condition', and set to 'Product Attribute -> Category'. Then use the category chooser to select the category. Your Condition should look something like "Category is {category id}". The other options are pretty much self explanatory. When you click 'Create Widget' magento will insert code in your block that looks like this:

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" show_pager="1" products_per_page="5" products_count="10" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:2:`75`;]]"}}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.