In this tutorial, Today we will learn about how to get CMS page collection by identifier in Magento 2. For that, You need to inject \Magento\Cms\Api\PageRepositoryInterface into your construct. PageRepositoryInterface is an interface that is used when you need to get the collection of CMS page, Delete CMS page, Delete or get CMS Page data by specific CMS page ID,…
Tag: collection
Magento 2 : Get Recently Viewed Product Collection of Customer
In this tutorial, Today I will explain you about how to get recently viewed product collection of customer programmatically in Magento 2. In your store, Display recently viewed product is most important role to successful of your Magento store. It display based on number of time product page viewed by user. It will also helpful for enhance shopping experience of…
Magento 2 : Get Product Collection
In this technical blog, we will see different ways of get product collection in Magento 2. Nowadays, Somewhere in every project developers need to get product collection with many conditions. In other words, There are lots of ways and filters available to get product collection for details of products. Here, we will see how to get product collection with filters,…
How to Add Pagination to Custom Collection in Magento 2
In this tutorial, Today I will explain to how to add pagination to custom collection in Magento 2. Whenever you have large number of records in your collection at that time, we should add pagination so, page load will be increase and limited records only display when page load. So, How to add in your custom collection. Let’s follow the…