Orders

Link Magento 2 Guest Orders to Customer Accounts

In newer Magento versions, there is the ability for customers to create an account after they have placed an order as a guest. This allows the customer the ability to track their order. There might be times where customers have placed orders in the past as guests and have only recently registered an account with …

Programmatically Create an Order in Magento 2

This post will demonstrate how to programmatically create an order in Magento 2 Open Source version 2.2 using both guest and registered customers. There is a possibility that the code will work with other versions of Magento 2, however it has not been tested with them.
The code shown below will be contained within a …

Adding Custom Attributes to Magento 2 Quotes and Orders

Magento 2 provides some default attributes that are added to the quote and order item data. Here is how to go about adding custom Attributes to Magento 2 quotes and orders.
If you’ve read Adding Custom Attributes to Quotes and Orders in Magento 1, then the below steps aren’t too dissimilar from adding custom attributes …

Add a Custom Total in Magento 2

Custom totals can be added to provide a surcharge or discount to customers on your Magento store. To add a custom total in Magento 2, the total must first be defined within a configuration file.
The article will assume that you have correctly created a vanilla module with the registration.php and etc/module.xml files present.
The …