Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding addresses to customer not working #18

Open
cglantschnig-zz opened this issue Jan 19, 2015 · 2 comments
Open

adding addresses to customer not working #18

cglantschnig-zz opened this issue Jan 19, 2015 · 2 comments

Comments

@cglantschnig-zz
Copy link

The function magento.customerAddress.create is not working properly.

I am using it like that:

magentoApi.customerAddress.create({
    customerId: 137,
    addressData: {
        "firstname": "John",
        "lastname": "Smith",
        "street": ["great street 44"],
        "city": "New York",
        "region_id": 43,
        "region": "New York"
        "country_id": "AT",
        "postcode": "1200",
        "telephone": "0660 233 332 3"
    }
}, callback);

When I run this code. I get the Magento Error "Customer email is required". If I add the email to the addressData it is still not working.

Any idea what went wrong?

@tmarshall
Copy link
Contributor

@Safari92 I believe you must add email when calling magentoApi.customer.create.

The error you are seeing is because it's looking up the customer record, via customerId.

@cglantschnig-zz
Copy link
Author

@tmarshall but in a previous call I created a User with the method you mentioned, where I had to add an email and I can see this user in the Magento adminarea as well as loggin into the frontend with that User.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants