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…
Tag: how-to
Different ways to Magento 2 Page Speed Optimization
In this tutorial, Today I will explain to how to page speed optimization of your Magento 2 website. Magento 2 speed optimization is the most important step when you want to increase traffic to your store. Sometimes, when the little bit store’s speed is lower then, the store owner will lose many orders because of low site speed. So, It’s…
How to Add Days to Date in Magento 2
In this tutorial, Today I will explain how to add days to the date in Magento 2. For example, If you want to get the date for the next days or want to add 5 or 7 days to the current date then, how to add days to date and get value in Magento 2. Let’s follow the below way…
How to Disable Guest Reviews in Magento 2
In this tutorial, Today I will explain how to disable guest reviews in Magento 2. Magento 2 also provides that guest users can also submit reviews for products. But, if you want to set like only logged in customers can able to submit product reviews that how can do that? You may also like this : Magento 2 : How…
How to Check Elasticsearch is Enabled Programmatically in Magento 2
In this tutorial, Today I will explain how to check Elasticsearch is enabled or not programmatically in Magento 2. After Magento 2.3.x, It provides a third-party search engine which is Elastic Search. Now, if you want to develop some functionality based on elastic search enabled or not then, how can you check that elastic search enabled or not. So, Let’s…
How to Get Base URL and Current URL in Magento 2
In this tutorial, Today I will explain to how to get store base URL and current URL in Magento 2. Magento 2 get base URL is require many times at development time. So, Let’s follow the below code : You may also like this : How to Install Magento 2.4 using Command Line How to Read CSV Data as Array…
How to Read CSV Data as Array in Magento 2
In this tutorial, Today I will explain to how to read CSV data as array in Magento 2. Sometimes, Developer need to read data and convert into array to manipulate data and use data in business logic. For that, you need to use Magento\Framework\File\Csv class in your construct. Let’s follow the below code for read csv data as array. You…
How to Get Products by Category using GraphQL in Magento 2
In this tutorial, Today I will explain to how to get products by category using GraphQL in Magento 2. After Magento 2.3.x, we can use GraphQL which is useful as an alternate option of REST API and SOAP API. GraphQL is one of the query language for the API which is used to load only requested data from server. In…
How to add new customer address by REST API in Magento 2
In this tutorial, Today I will explain to you how to add new customer address by REST API in Magento 2. In Magento 2, If you want to add new customer address, you must require a customer token before add new customer address. You can get customer access token from this below url. For that, you need to pass customer…
How to get customer access token by REST API in Magento 2
In this tutorial, Today I will explain to how to get customer access token by REST API in Magento 2. In Magento 2, If you want to get customer access token you need to pass customer email id and customer password. You may also like this : Index and Cache Management using Magento 2 REST API How to Add Custom…