The custom product types
Magento provides the following six out-of-the-box product types:
Simple products
Configurable products
Grouped products
Virtual products
Bundle products
Downloadable products
Each product has its specifics. For example, the virtual and downloadable products do not have the weight
attribute. Therefore, they are excluded from the standard shipping calculations. With custom coding around built-in product types, by using observers and plugins we can achieve almost any functionality. However, this is not enough sometimes or there is no solution to the requirement. In cases such as these, we might need to create our own product type that will match the project requirements in a more streamlined way.
Let's create a miniature module called Foggyline_DailyDeal
that will add a new product type to Magento.
Start by creating a module registration file named app/code/Foggyline/DailyDeal/registration.php
that has the following partial content:
\Magento\Framework\Component\ComponentRegistrar...