Multi-Source Inventory in Magento 2.3

Magento 2.3 GA release has finally landed.It is one of the most awaited releases Magento has ever seen, and it’s a thrilling moment for us at Atwix. Not only can our clients now benefit from all the new features that are available in 2.3, but we can also see live features that our team developed, working closely with other community contributors as well as the Magento Community Engineering team.

How to add custom layout handle to category in Magento 2

In order to add a custom layout handle to a category page, a (basic) Magento 2 module with these additional files and content is needed:

1. The events.xml file to “subscribe” to the event and say which observer should be fired
2. An observer that adds a new layout handle to the page
3. A layout file that adds needed changes to the page

JavaScript bundling is an optimization technique you can use to reduce the number of server requests for JavaScript files. It is achieved by merging multiple JavaScript files together into one file to reduce the number of page requests. By default, Magento 2 allows excluding the particular JavaScript files from bundling by specifying the corresponding file in exclude node of the etc/view.xml file for a theme. However, sometimes it’s not enough.

The Magento page cache library contains a simple PHP reverse proxy that enables page content caching. There are two types of distinguished content: private and public.

The “private” content is being served for each user separately and represents the personalized data of a customer. E.g. shopping cart, wishlist, customer addresses, notification messages. This data should not be cached on the server side, and should not be shown to more than one user. The private content is stored on the client’s side by Customer Data JS component (Magento_Customer/js/customer-data.js). However, this is a topic for another blog post. Today we will focus on the second content type – public content, or rather the cacheable content and its variations in terms of customer grouping.

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.

How to add the details for cart item in Magento 2

In this blog post, I would like to share a pretty interesting and not obvious solution on how to join some additional details to cart item block on checkout cart page.

Let’s say we need to add the “Brand” custom product attribute and show its value within a specific block on the product view page and checkout cart page. It’s very simple in the scope of the product page, but how to deal with number cart items on checkout cart page. There are a couple of issues which you may face with. We will cover them further.

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