I'm trying to create new product type in magento and it is showing up in admin panel create new product page's product type options, but when I select it and continue, i get fatal error:

Fatal error: Call to a member function setConfig() on a non-object in C:\xampp\htdocs\gift\app\code\core\Mage\Catalog\Model\Product\Type.php on line 80


1 Answer 1


Each product type must have a 'type instance' model associated to it.
For example the simple products have this type instance Mage_Catalog_Model_Product_Type_Simple, configurable have Mage_Catalog_Model_Product_Type_Configurable and so on.
Most probably in your case the type instance model is not declared or does not exist.
See in config.xml of the catalog module how you should declare your product type in the path catalog/product/type.
Here is how the configurable product is declared

               <configurable translate="label" module="catalog"> <!-- unique tag - type name --> 
                    <label>Configurable Product</label> <!-- label for the form type dropdown -->
                    <model>catalog/product_type_configurable</model><!-- type model - this is what is missing for you probably -->
                    <price_model>catalog/product_type_configurable_price</price_model><!-- price model class -->
                    <composite>1</composite><!-- is composite or not -->
                    <allow_product_types> <!-- allowed types in composite products. you may not need this -->
                    <index_priority>30</index_priority><!-- sort order in the admin dropdown -->
                    <price_indexer>catalog/product_indexer_price_configurable</price_indexer><!-- indexer class for price index -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.