Magento API を使用して構成可能な製品を作成するにはどうすればよいですか?
11186 次
4 に答える
4
これは、magento-improve-apiプラグインで可能です。構成可能な製品が構成可能な属性を制御する必要がある場合は、そのプラグインのフォークの 1 つが必要になります。
于 2013-05-22T12:27:34.740 に答える
4
API を使用して構成可能な製品を作成するという質問 - 答えは、「できません」です。それはサポートしていません(少なくとも。)
于 2011-04-26T22:02:57.180 に答える
0
http://www.magentocommerce.com/wiki/doc/webservices-api/api/catalog_product#example_2._product_createviewupdatedeleteからコピー/貼り付け
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
// default attribute set in my install is 4
$attribute_set_id = 4;
// configurable product to create
$product_sku = 123456789012;
$newProductData = array(
'name' => 'name of product',
// websites - Array of website ids to which you want to assign a new product
'websites' => array(1), // array(1,2,3,...)
'short_description' => 'short description',
'description' => 'description',
'price' => 12.05
);
$proxy->call($sessionId, 'product.create', array(
'configurable',
$attribute_set_id,
$product_sku,
$newProductData
));
難しいのは、単純な製品を構成可能なものに割り当てることです (API 経由ではサポートされていません)。simples を configurables に直接割り当てる方法は次のとおりです
于 2011-04-26T19:30:46.787 に答える