Magento: How to create configurable product

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:

Capture d’écran 2014-03-20 à 23.10.20Note the important properties:  Scope = Global & Use To Create Configurable Product = Yes

And create your Label / Options

Capture d’écran 2014-03-20 à 23.16.19

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:

Attribute Sets

3. Create your Simple Product with the new Attribute Sets

Menu : Catalog -> Manage Products -> New Product

Capture d’écran 2014-03-20 à 23.18.48

And create the simple product for each attribute options :

Capture d’écran 2014-03-20 à 23.21.40

4. Create your configurable product

Capture d’écran 2014-03-20 à 23.26.38

Capture d’écran 2014-03-20 à 23.27.23

And you can associate your Associated Products

Capture d’écran 2014-03-20 à 23.28.45

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/

Ce contenu a été publié dans Magento, avec comme mot(s)-clé(s) , , , , , , , . Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Captcha (solve the arithmetic equation) * Time limit is exhausted. Please reload CAPTCHA.