Magento API Datatype: CartCustomerEntity

When trying to create a cart through the Magento API, I had problems adding an existing user as the owner of the cart. I work with the documentation they provide here:

http://www.magentocommerce.com/wiki/doc/webservices-api/api/cart#cart_customer.set

I called "customer.info" using my specific customerId, and then just passed the results to this cart_customer.set method, praying for what he requested. He's back (from PHP)

Fatal error: throw exception SoapFault: [1045] Client mode unknown in ...

I looked at the example at the bottom of the link page, and they only had an example for a new guest, "mode" is set to "guest". I was wondering if anyone knows what other options were for this "regime"? Documentation on this data structure as a whole would be a big help.

Thanks.

+4
source share
1 answer

Through my own comment:

Yeah! Found buried in the forum:

$ customer = array ('entity_id' => 6, 'mode' => 'customer'); via http://www.magentocommerce.com/boards/viewthread/232778 I think this is all you need to go through. This is not a good explanation, but it solves the original problem.

Just mark it how it's done.

+9
source

Source: https://habr.com/ru/post/1388526/


All Articles