Ok so I can create a new model using a catalog_product model and saving it, no problems here.
$model = Mage::getModel('catalog/product');
I can also set a load of properties of the object before saving such as price, sku, description etc.
'sku' => 'test-sku',
'store' => 0,
'type' => 'Simple Product',
'categories' => '12,25',
'name' => 'Test Product ',
'description' => 'Here is the description of this product.',
'price' => '12.99'
Now I thought setting type to ‘Simple Product’ was doing just that, but on trying to change it to Configurable Product, configurable or any other type I am discovering that it is most likely this type isnt even used and the product is just defaulting to simple.
I had a look through the technical docs and came across Mage::getModel(’Catalog/Product/Type/Configurable’); and thought aha, maybe im using the wrong model type etc, this didn’t work either!
Other interesting methods I found were: setTypeId() and setTypeInstance() both of which i thought might change the type of product either by ID or by passing an object of the type but so far no luck.
Has anyone managed to create a configurable product using just models and not the product API or the magento importer?