The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

API customer_save requires default country?

bistrostudiosbistrostudios Member
in Bugs & Feature Requests edited November 2010
Hi guys,

Was befuddled by this one, then think i found the issue, but wanted to submit it to see if there's a better way, or if it can help someone else.

Essentially, I give users the option to create an account on my site, but I was only sending the API their email and password. When I went to checkout, and logged in as one of those new users, obviously the Billing Address Country field wasn't filled in. So I filled it in and went to checkout. On clicking checkout, I got a JS error that a data array was undefined. Found out if I clicked "Ship to Different Address" that the Shipping Address Country field wasn't filled out. When I filled that Shipping Address Country field out, the JS error went away, and I was able to finish my checkout.

Question is: do I need to send a default billing and/or shipping country with the api "customer_save" command? am i leaving something out here? shouldn't it be looking at the billing country - and disregarding the shipping country - if I'm shipping to the billing address?
  • lukeluke FoxyCart Team
    Hey bistrostudios. Thanks for posting. We actually had a report of this in our helpdesk from another user a couple weeks back. The quick fix is to default the customer_country, customer_country_name, shipping_country and shipping_country_name to valid values ("US" and "United States") but it's on our radar for a more permanent fix. I'm thinking an easy solution would be to default the values based on the store settings. Would that work for you?
Sign In or Register to comment.