Próbuję utworzyć zamówienie z Magento SOAP API v1 i mam problem przy dodawaniu produktów do koszyka do koszyka. Potrafię poprawnie zrealizować zamówienie za pomocą prostych produktów, ale nie jestem pewien, czy dodać produkty w pakiecie.API mydła Magento Dodaj paczkę Produkt do koszyka
// 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));
Próbowałem wielu różnych formatów i coraz błędy
Selected required options are not available
Please specify product option(s).
Każda pomoc lub sugestie będą bardzo mile widziane.
starają się „bundle_option” tu http://inchoo.net/ecommerce/magento/programatically-add-bundle -produkt-to-cart-n-magento/Masz metodę PHP API, ale tablica powinna być podobna –