How to fetch extension attributes value in Order by REST API Magento 2?

Magento comes with a new design pattern called the service contracts.

A service contract is a set of PHP interfaces used in a module. You can check an interface in any module API folder. Service contracts include service and data interfaces, which hide business logic details.

In Magento 2 You can add extension attributes for Order by creating an extension_attributes.xml file.

Extension attributes are the persistent Attribute so you can’t find extension_attributes values in a database.

Continue reading “How to fetch extension attributes value in Order by REST API Magento 2?”

How to add custom tab in admin Sales Order view magento 2?

In Magento 2, Sales Order Page in the admin panel, Many Tabs are available by native like Information, Invoices, Shipments, Credit Memos, Transactions and comment history.

For your custom requirement, you need to add extra tab in Order page, You can add your custom tab in Admin Order View page by just simple module.

Continue reading “How to add custom tab in admin Sales Order view magento 2?”

How to get orders list by customer id in graphql magento 2?

From Magento 2.4 Out of the box, Magento supports Customer Orders History using GraphQL.

You can check the syntax by clicking Retrieve all the Order list of a customer by GraphQL Query

Given Article is used for the learning of GraphQL Practice with Magento. I have written an article before Magento supports the Sales GraphQL feature in the core code.

How to get a list of orders of a customer using GraphQl Magento 2?

We need to create a simple module for getting all the order lists of Customer using GraphQl. Default Magento 2, We can easily get all the orders of a customer by fetch OrderRepository.

Using Graphql, You can get an order list of a specific registered customer by customer id.

We need to create a Resolver model and add our custom logic for getting all the Customer Order list. We will display all the orders of a customer in the response to the query.

I hope you are aware of What is GraphQl and how GraphQL is used in Magento 2 If You are new to GraphQL check the link for GraphQl in Magento 2.

Now we can start the module using Magento 2 to fetch all orders of a specific customer. Continue reading “How to get orders list by customer id in graphql magento 2?”