Retrieve All Payment Methods list in Magento 2.

In Magento 2 You can retrieve all the available payment methods by Magento\Payment\Model\Config\Source\Allmethods class.

Using Allmethods class you can get all the payment methods in the system whether its enable or disable in the admin setting.

You can get only the active payment methods by Get all active payment methods in Magento 2.

List of all the payment methods in Magento 2 getting by below code snippets, Continue reading “Retrieve All Payment Methods list in Magento 2.”

How to get all the Items of Order In Magento 2?

In this tutorial, We want to get all the items of the placed order.

The customer placed an order and after place order, if a developer needs to get all the items programmatically this tutorial will help them.

We can get all the items of the order by order id in Magento 2 by just simple code snippets. For,  getting all the items of Order we need to required order id. Continue reading “How to get all the Items of Order In Magento 2?”

How to apply custom conditions for product collection in Magento 2?

In Magento 2, There are some situations where you need to set custom conditions for layered(filter) navigation. In Magento 2, All product collection comes from Catalog Module at Layer.php file from vendor/magento/module-catalog/Model/Layer.php. Continue reading “How to apply custom conditions for product collection in Magento 2?”