Ich versuche eine Bestellung mit Magento SOAP API v1 zu erstellen und habe Probleme beim Hinzufügen von gebündelten Produkten zum Einkaufswagen. Ich bin in der Lage, mit einfachen Produkten richtig zu bestellen, aber ich bin verwirrt über das Hinzufügen von gebündelten Produkten.Magento Soap API Produktpaket zum Warenkorb hinzufügen
// 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));
Ich habe versucht, viele verschiedene Formate und immer Fehler
Selected required options are not available
Please specify product option(s).
Jede Hilfe oder Anregungen wäre sehr dankbar.
Try change „Optionen“ auf „bundle_option“ hier beschrieben http://inchoo.net/ecommerce/magento/programatically-add-bundle -product-to-cart-n-magento/Sie haben PHP-API-Methode, aber Array sollte ähnlich sein –