Create new order state and status programmatically in Magento 2

Every order has a status associated with a stage in the order processing workflow.
The state describes the position of an order in the workflow. By default, Magento store has a set of predefined order statuses and order state settings. All the available order statuses can be found in admin panel under Stores -> Settings -> Order Status. Sometimes we need to create a new order status and state. Let’s explore how to programmatically create a new order state and status in Magento 2.

Adding custom attribute to Magento 2 API response

Magento 2 implements the “service contracts” design pattern, which comprises a set of PHP interfaces defined for a module. A service contract encompasses both service and data interfaces. These interfaces conceal the intricacies of business logic from service requestors like controllers, web services, and other modules. By the way, our agency is developing Magento extensions, so if you need help with this, please contact us

Refresh order grid table in Magento 1

Recently, we’ve faced a data inconsistency in the Magento sales_flat_order_grid db table. Some of the values in custom columns look like they were shifted. This issue may occur if the order grid has multiple custom fields and when a user archives orders in the Enterprise Edition.

You can find several articles which are related to adding columns to Magento admin grids in Atwix blog. However, not everything is fully covered, and our readers keep asking how to add SKU, Products columns, etc. So, let’s take a closer look at this topic.

PDF invoice in order confirmation email

As everyone who uses Magento knows, in most cases after each order, the customer receives an order confirmation email which contains some useful information about an order that has been just placed. However, sometimes, it would be great to provide some additional information alongside with an order confirmation – such as payment information. There are some ways in Magento for extending emails with custom info, but often they require a lot of time and deep technical knowledges. Let’s leave these ways for people who has an extra time and review the simple and fast way how to add an invoice information to the order confirmation email.

Grid filter for columns with complex values

In previous articles we told you how to operate with columns in adminhtml grids. Usually the process is quite fast, for example, if you want to add simple column from the database. But sometimes you need to add a column with complex value, processed by renderer. You say: “it’s not a big deal to use renderers…” Right, until you face with sort and filter..