Initializing module configurations
In Chapter 4, Creating a Module, you learned how to create a custom module. In this recipe, we will create a new module where we will add the required settings for a shipping module.
In the later recipes of this chapter, we will extend this module with more shipping features.
Getting ready
Open your IDE with the Magento 2 project. We will also need the backend, where we will check some configurations.
How to do it...
The following steps describe how we can create the configuration for a shipping module:
First, we have to create the following folders:
app/code/Packt/
app/code/Packt/Shipme/
app/code/Packt/Shipme/etc/
app/code/Packt/Shipme/Model/
app/code/Packt/Shipme/Model/Carrier/
Create a
module.xml
file in theapp/code/Packt/Shipme/etc/
folder with the following content:<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name...