2

I am using this code but it gives error "Call to a member function getId() on a non-object"

    $c = array(
                '272' => 25,
                '502' => 46
            );
    $arrProducts = array(
        array(
            'product_id' => $_REQUEST['product_id'],
            "super_attribute" => $c

        ),
    );

    $resultCartProductUpdate = $client->call($sess_id,'cart_product.remove',array($_REQUEST['CartID'],$arrProducts));   
0

You are not using the arguments indicated by the API documentation: http://devdocs.magento.com/guides/m1x/api/soap/checkout/cartProduct/cart_product.remove.html

There is no super_attribute key for shoppingCartProductEntity, you should use the options key instead.

You should replace $arrProducts with:

$arrProducts = array(
    array(
        'product_id' => $_REQUEST['product_id'],
        'options' => $c
    ),
);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.