Sometimes the default attributes provided by Magento might not be enough. Here we explain how to add customer and customer address attributes in Magento 2. If you have followed the post on how to add category attributes, you will know that Magento 2 uses the InstallData class. This is no different to adding customer-related attributes,…
It is quite common for developers to customise their website header by adding and removing top links in Magento 2. Similar to earlier versions of Magento, the links are added within several layout XML files. If you have installed Magento via Composer, the location of the customer-related links will be found in the following path.…
Configuring database adapters within Zend Framework 3 is similar to how they are configured in earlier versions of Zend. Within your project root, a config/autoload/global.php and config/autoload/local.php.dist file should exist. You should recognise these files from ZF2. You can add database adapters to either of these files (after you have renamed the local.php.dist file to…
The Magento checkout flow involves templates, block classes and JavaScript to work together in order for the customer to successfully place an order. This article will explain what files are involved and how the checkout works. To start with, it is worth looking at the checkout.xml layout file within the RWD theme and specifically looking…
Within Magento there are a variety of different email templates ready for the merchant to use to send out order and account related emails to the customer. Occasionally, you'll want to add a custom email template in Magento. Email templates are stored within the locale/en_US/template/email directory with the sales related emails located within the sales…
Magento's Page Cache module successfully caches page content and is now a part of the Community Edition releases. The cached content can be split into two parts: public content and private content. Public content is stored within the cache location you specify for your Magento application, either in the file system, in the database, or…
As well as customers placing an order and going through the checkout, the Magento merchant has the ability to create orders in the admin area in the Sales -> Orders section. You are then presented with a screen to choose a customer to associate the order to. The next step is then to specify the…
The Magento customer address entity is found in the database as a customer_address entity type found in the eav_entity_type table. Similar to how customer attributes are created, we can use setup scripts from a custom module to add, modify or remove customer address attributes from the database. First, the module's declaration file needs to be…
Magento 2 Overriding Template Files You can override template files within Magento 2 thanks to its powerful theme inheritance feature. This means you can easily extend themes whilst minimising the maintenance efforts to do so. For the purpose of this article, we will assume you have already created a basic theme directory structure. In this…
Adding a custom checkout step to Magento's Onepage checkout is no easy task. It's important to understand the templates and block classes involved, as well as the JavaScript used to show and hide the relevant steps. Let's take a look at the RWD checkout and outline what is already defined. Firstly, we have six checkout…