I am developing a new product type. I based my tests on http://www.solvingmagento.com/creating-a-custom-product-type-in-magento/. I have renamed all the code to suit my company name.
The custom product type does appear in magento, but I can't add it to any orders (via the backend) when "create new order"
Say for example my new product has a type_id of "custom_product"
I looked in the catalog_product_entity table in the database and if i change the type_id field of one of my new products to one of the built in types such as virtual or simple, it shows up in the list of products in "create new order"
This is confirmed by turning on mysql query logging. here is an example of the query executed.
SELECT `e`.* FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_website` AS `product_website` ON product_website.product_id = e.entity_id AND product_website.website_id = '1' WHERE (((`e`.`type_id` = 'simple') OR (`e`.`type_id` = 'virtual') OR (`e`.`type_id` = 'configurable') OR (`e`.`type_id` = 'grouped') OR (`e`.`type_id` = 'bundle') OR (`e`.`type_id` = 'downloadable'))) ORDER BY `e`.`entity_id` DESC LIMIT 20
How do I specify what type_id s are in the filter? Is this in XML? Do I override a class? Is it configurable in the backend?
Thanks in advance.
EDIT ---------------- I FOUND THE ANSWER ----- BUT I'M NOT ALLOWED TO ANSWER IT!
add this to the config.xml
you need to add to the config.xml
<adminhtml> <sales> <order> <create> <available_product_types> <affiliate/> </available_product_types> </create> </order> </sales> </adminhtml>