Create custom product type in Magento – As you know, in Magento, there are 6 product types:
– Simple products
– Configurable products
– Grouped products
– Bundle products
– Virtual products
– Downloadable products
In this tutorial, we will show you how to create a custom product type in Magento. If you don’t have your own module, please create a simple one following this post.
To create a new product type, we need to do:
– Edit your config.xml file to declare your new product type
– Create a model for your product type
– Create a model for your product type price
Let’s do it step by step.
Contents
1. Edit your config.xml file.
Open file /app/code/local/YourVendor/YourModule/etc/config.xml and add content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<config> <global> <catalog> <product> <type> <special> <label>Special Product</label> <model>yourmodule/catalog/product/type/special</model> <price_model>yourmodule/catalog/product/type/special/price</price_model> </special> </type> </product> </catalog> </global> </config> |
– ‘special‘ is your product type code.
– ‘yourmodule/catalog/product/type/special‘ is your product type model.
– ‘yourmodule/catalog/product/type/special‘ is your product type price model.
2. Create product type model.
Create new file /app/code/local/YourVendor/YourModule/Model/Catalog/Product/Type/Special.php with content:
1 2 3 4 5 6 7 8 |
<?php class YourVendor_YourModule_Model_Catalog_Product_Type_Special extends Mage_Catalog_Model_Product_Type_Abstract { } ?> |
3. Create product type price model
Create new file /app/code/local/YourVendor/YourModule/Model/Catalog/Product/Type/Sepecial/Price.php with content:
1 2 3 4 5 6 7 8 |
<?php class YourVendor_YourModule_Model_Catalog_Product_Type_Special_Price extends Mage_Catalog_Model_Product_Type_Price { } ?> |
In those 2 classes, you can override some functions of Magento core product type. You can find parent classes at:
/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
/app/code/core/Mage/Catalog/Model/Product/Type/Price.php
At last, refresh all cache types and try to create a new product to check if Magento recognized your new product type.

If you have any question, leave a comment or contact us.