Sto provando a creare un ordine con l'API SOAP Magento v1 e ho riscontrato problemi con l'aggiunta di prodotti in bundle al carrello. Sono in grado di ottenere un ordine attraverso correttamente con prodotti semplici, ma sono confuso sull'aggiunta di prodotti in bundle.Magento Soap API Aggiungi pacchetto al carrello
// The Products Array with Bundle
$products = array(
array(
"product_id" => "38914",
"qty" => "1",
"bundle_option" => array(
"18194" => "20360",
),
"related_product" => null,
"bundle_qty" => array("20360" => "1"),
"options" => array(
"0" => array(
"key" => "3328",
"value" => "4494",
),
"1" => array(
"key" => "3329",
"value" => null,
),
"2" => array(
"key" => "3339",
"value" => null,
),
)
)
);
// Get an API session
$client = new \SoapClient('magentoinstallation/index.php/api/soap/?wsdl');
$session = $client->login('user', 'password');
//Create the Cart
$cart = $client->call($session, 'cart.create');
// add the products
$resultCartProductsAdd = $client->call($session, "cart_product.add", array( $cart, $products));
Ho provato molti formati differenti e ottenere gli errori
Selected required options are not available
Please specify product option(s).
Qualsiasi aiuto o suggerimento sarebbe molto apprezzato.
Try Change "opzioni" a "bundle_option" qui http://inchoo.net/ecommerce/magento/programatically-add-bundle -product-to-cart-n-magento/Hai un metodo API PHP ma array dovrebbe essere simile –