0

When I call "shoppingCartProductAdd" it adds the specific customer to the cart and displays it when I call "shoppingCartInfo". However it does not show up in the cart from the customer on the frontend. Is it possible to add a customer to an existing cart (also created with SOAP API) and display it on the frontend? Or is this not the scope from the API?

My SOAP calls:

Creating the shopping cart:

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <x:Header/>
    <x:Body>
        <urn:shoppingCartCreate>
            <urn:sessionId>{sessionId}</urn:sessionId>
            <urn:storeId>1</urn:storeId>
        </urn:shoppingCartCreate>
    </x:Body>
</x:Envelope>

Adding a product to the cart

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
<x:Header/>
<x:Body>
    <urn:shoppingCartProductAdd>
        <urn:sessionId>{sessionId}</urn:sessionId>
        <urn:quoteId>682</urn:quoteId>
        <products>
            <product>
                <sku>testproduct</sku>
                <qty>1</qty>
            </product>
       </products>
       <urn:storeId>1</urn:storeId>
   </urn:shoppingCartProductAdd>
</x:Body>

Set the customer from the cart

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <x:Header/>
    <x:Body>
    <urn:shoppingCartCustomerSet>
        <urn:sessionId>{sessionId}</urn:sessionId>
        <urn:quoteId>682</urn:quoteId>
        <customer>
            <mode>guest</mode>
            <firstname>firstname</firstname>
            <lastname>lastname</lastname>
            <email>[email protected]</email>
            <customer_id>137</customer_id>
        </customer>
    </urn:shoppingCartCustomerSet>
</x:Body>

1 Answer 1

0

Turned out the cart/quote is not active when adding it via SOAP API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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