Magento 2: List of All Available Condition Types Used in Search Criteria

Introduction In the Magento 2 when we build a Search Criteria we use filters. And each filter takes parameter condition type. This parameter is necessary to say Magento how we want to filter a field: should a field be greater or less than passed value to the filter, for example. In my previous article I explained in simple terms how we can use Search Criteria. In this article I prepared the table of all available condition types in the Magento 2 with filters and conditions and without it....

June 4, 2023 · 1 min

Magento 2: How to Get Category List. Use Search Criteria.

Introduction Sometime we need to load Category List while developing something for Magento 2. And there are a few ways to do it. But in this small chapter we will use the right way. Solution The right way to load Category List includes two things: use CategoryListInterface to get the list of categories use Search Criteria to build a query Here is the basic code to load Category List. This code will load All Categories, becuase we are using empty Search Criteria....

June 4, 2023 · 4 min