You can use my Magento Module to create programmatically configurable products but Magento need to be configured correctly.
You will find below how to create a configurable product using the Megento’s Admin interface.
1. Create your attribute
Menu : Catalog -> Attributes -> Manage Attributes
Click on Add New Attributes
You will find below an example of my format attribute:
Note the important properties: Scope = Global & Use To Create Configurable Product = Yes
And create your Label / Options
2. Create a attribute Sets
Menu : Catalog -> Attributes -> Manage Attribute Sets.
Click on Add New Set and give a name to your attribute sets.
You will find below an example:
3. Create your Simple Product with the new Attribute Sets
Menu : Catalog -> Manage Products -> New Product
And create the simple product for each attribute options :
4. Create your configurable product
And you can associate your Associated Products
5. Example using my magento API
The last step can be created with my Magento API using PHP client script:
attr_push($myarray,$client,$session,'783',array('30','30'),$mypercent,$myattr); attr_push($myarray,$client,$session,'784',array('40','40'),$mypercent,$myattr); attr_push($myarray,$client,$session,'785',array('40','40'),$mypercent,$myattr); // 783 784 785 $configurableProductsData = $myarray; //Create the configurable attributes data $configurableAttributesData = array( array( 'attribute_code' => 'format', ) ); // Create Product $myproductData=array( 'categories' => array(5), 'websites' => array(1), 'name' => "Titre Plexiglass (plexiglass)", 'description' => "Description ....", ... ); // Call my API function $result=$proxy->MyapiProductCreate((object)array('sessionId' => $sessionId->result, 'type' => 'configurable', 'set' => $attributeSet->complexObjectArray[1]->set_id, 'sku' => $sku, 'productData' => $myproductData, 'confData' => $configurableProductsData, 'confAttrData' => $configurableAttributesData, 'store' => $mystoreid));
Note : the full example will be available into my API directory.
My Module is available here !
Voila,
Nicolas Portais
Author Photographer
http://www.mystockphoto.fr/