2

I'm using the SOAP V1 api and attempting to set the customer. My site does not have a customer login, so I want to set the customer mode as guest. . . exactly as is done in the example in the docs for this call.

I'm using node and MagentoJS to connect to my store; my customer array is:

    var customerArray = [{
        'firstname'     : 'test',
        'lastname'      : 'user',
        'email'         : 'test.user@gmail.com',
        'mode'          : 'guest',
        'entity_id'     : '5'
    }];

The error that I keep getting is:

[Error: XML-RPC fault: Customer's mode is unknown]
  code: 1045,
  faultCode: 1045,
  faultString: 'Customer\'s mode is unknown'

Anyone have any idea what's going on? Do I need to set up the mode elsewhere previously? And the entity_id? If so, where does that happen?

  • what is entity_id you are using? What is the purpose of that? – huzefam Jul 4 '14 at 4:14
  • I have no idea what entity_id is to tell the truth. I put it in and played with different numbers to see if it did anything, but, to my sadness, it did not. – trestray Jul 10 '14 at 3:15
  • if you are in mode guest, why do you need any entity_id, just skip it – huzefam Jul 10 '14 at 3:21
3

I hired a magento expert and the solution was to make the customer array as such. . .

{ firstname: 'test', lastname: 'user', email: 'test.user123@gmail.com', website_id: '1', store_id: '1', mode: 'guest' }

Hopefully this helps someone!

  • How does that differ to the version in your question? – dukedave Sep 16 '14 at 20:58
  • What if the user is logged in already ?? The mode can't be guest all the time ?? – Gem Sep 4 '15 at 10:23
3

If the user is logged in then you have to set the customer mode to

customer

$customer = array( 'entity_id' => 6, 'mode' => 'customer' ); 

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.