I'm trying to get all products in my store programatically and show them in the default product grid/list as shown below.
I've already gathered all products with the productcollection. But i don't know how to display them in the product grid/list.
I'm trying to get all products in my store programatically and show them in the default product grid/list as shown below.
I've already gathered all products with the productcollection. But i don't know how to display them in the product grid/list.
You can refer this tutorial - http://www.mage-world.com/blog/create-the-news-list-page-via-frontend-in-magento-2.html The only feature excluded here is toolbar for grid/list and sort toolbar so add below code in your layout block content will help
<block class="Magento\Catalog\Block\Product\ProductList\Toolbar" name="product_list_toolbar" template="Magento_Catalog::product/list/toolbar.phtml">