Product Type is invalid or not supported in rows for custom product type

13.7k Views Asked by At

I'm having Custom product type product in my Magento store like "bookable".so i try to import 3 product with "_type" value "bookable". It throw me the error

   Product Type is invalid or not supported in rows: 1, 2, 3

I found the validation i checked here in core

app/code/core/Mage/importexport/Model/import/Entity/Product.php

line around 1439.

How can i solve this problem

Thanks in advance

1

There are 1 best solutions below

2
On BEST ANSWER

With that error there are two possible problems.

a.) You haven't got a _type column in your csv.

I'm going to assume you have at this point.

b.) Magento cannot find the type model for bookable.

The type models are loaded from xml config in the protected method _initTypeModels of that class. Looking at that method you will see that the supported models are loaded via the global/importexport/import_product_types node in your config. So whatever module is including this bookable product will need to add a node to it's config something along the lines of...

<global>
    <importexport>
        <import_product_types>
            <bookable>yourModule/import_entity_product_type_bookable</bookable>
        </import_product_types>
    </importexport>
</global>

Obviously you will also need to create the class YourCompany_YourModule_Model_Import_Entity_Product_type_Bookable, you can check out one of the inbuilt classes for an example (e.g. Mage_ImportExport_Model_Import_Entity_Product_Type_Simple).