Jump to content

[solved] checkout / address issues - country ID is required and Invalid token


Recommended Posts

Hello,

 

I am building a PrestaShop (1.5.4) site and having trouble with step 2 of the checkout process.

 

I cannot proceed past step 2 due to two frustrating errors:

  • country ID is required.
  • Invalid token.

I have the same issue if I try to checkout as a guest or login and save an address.

 

There is no Country field even in the list. And I have no idea where the token is.

 

Nor is there a postcode field in the list. How do I get them in there?

 

I have seen a couple of 2 year old posts with some long threads about this same issue relating to previous versions so thought I should start a new post as from the sounds of those posts, those changes will not apply to 1.5.4 - plus they are very old and I would have thought this was resolved by now.

 

These are the fields that show up in my site:

  • First name *
  • Last name *
  • Address *
  • Address (Line 2)
  • City *
  • Additional information
  • You must register at least one phone number.
  • Home phone
  • Mobile phone *

These are the fields that show up on the PrestaShop demo site at http://demo-store.pr.../en/quick-order:

  • First name *
  • Last name *
  • Company
  • Address *
  • City *
  • Zip / Postal code *
  • Country *
  • State *
  • Home phone *

See the Zip / Postal code * and Country * fields.

 

Have I got some setting wrong within the PS backend or is this a bug?

 

Please help.

 

Thanks in advance.

 

ps Why does this not just work straight out of the box?

post-634419-0-26973700-1375929761_thumb.jpg

Edited by sunnyb0y (see edit history)
Link to comment
Share on other sites

Hi Sunny,

What country to you want to sell to? The problem probably lies in the definition of the 'address' in the country you want to use.

 

Check a few things:

First check if you have defined a 'zone' to put your country in. And check if it is enabled.

Then edit the country you want to send to:

- Check if the country is in the wanted zone.

- Select if you want to use zip/postal code

- enter the format of the postal code (e.g. 4 digits, followed by 2 letters = NNNNLL (gives postal code like this: 9465KL)

- Then go to the address format. You see the current format in the left block, where probably your country and postal code are missing.

- go to the line where you want the country inserted (in left block).

- click on country on the right. Some (green?) fields will appear, where you can select if you want the name, the zipcode format etc of a country. Click 'name'. In the left block 'Country:name' will appear. (See if it is inserted in the right place)

- go to the place in the left block where you want the postal code should be inserted. Click on the right on 'address'. Some green fields about the address appear. Choose postcode.. This field will be inserted on the left.

 

Check if the country is 'active' (i.e. shown to your customers, so they can select it.)

 

Save. Check your checkout process again.

This should help with the country/post code problem.

 

Let me check about the token...

 

My 2 cents,

pascal

  • Like 3
Link to comment
Share on other sites

There are a few existing topics on this problem.

Have a look here:

http://www.prestashop.com/forums/topic/127474-solved-invalid-token-on-address-modify/

or here:

http://www.prestashop.com/forums/topic/2108[spam-filter]solved-invalid-token-when-adding-addresses-in-my-account/

 

 

There are a few more. Google on : prestashop address invalid token

 

Hope this helps. Please let me know if one of them worked, and add the link to it, so that others can re-use the knowledge. :-)

pascal

  • Like 1
Link to comment
Share on other sites

Hi Pascal,

 

Thank you so much for the easy to follow instructions and for taking the time to help.

 

The zones were set up correctly (Australia) but the address format was wrong (the country and postcode was indeed missing). I updated it per your "address format" instructions and it works now - thank you very much.

 

In fixing that, the token issue is no longer a problem either - many thanks.

Edited by sunnyb0y (see edit history)
Link to comment
Share on other sites

  • 2 months later...

I am having the same problem with country ID, the bottom to choose country appears, but no country name, I have the follow lines on address format:

 

firstname lastname
address1
address2
postcode city
Country:name
phone

 

I have country, zone and states active in de configuration, I have brazil and south america there, but the erro occur!

Link to comment
Share on other sites

Hi Flipe,

 

That looks similar to my settings but our country is included, I am not sure why yours wouldn't.

A PS expert might be able to help you.

Did you try Pascal's steps from the second post? That worked for me once I had the zones etc setup.

Because this thread is marked as solved, perhaps starting a new thread would get a better response from the PS experts?

Good luck.

Link to comment
Share on other sites

Flipe, do you have a link to your site, so we can have a look?

 

If you want, I can have alook inside your Back office, if I can see anything wrong. If you like that, please make a new Employee, with super-admin rights, and PM (Personal Message) me the login, password and URL to your login page of your shop back office. DON'T post them here :-). Or Email them to me: [email protected]

 

pascal

Link to comment
Share on other sites

Thank you two for the reply, I did again the Pascal steps and I did it, now the country appears in the menu and I can save, after it I had a problem with invalid token but a found that Address.tpl file with the corrections by your link, now that issue is solved, trying now solve the problem with shipping! :D

 

Really thank you again and sorry for the inconvenient!

Edited by flipe (see edit history)
Link to comment
Share on other sites

  • 3 months later...
  • 10 months later...

Hi Pascal,

 
 
 
I have the following:
 
firstname lastname
company
vat_number
address1
address2
postcode city  
Country:name
phone_mobile

Error:
 
There is 8 error(s):
  1. The Zip/Postal code you've entered is invalid. It must follow this format: 000000
  2. company is required.
  3. vat_number is required.
  4. address2 is required.
  5. postcode is required.
  6. other is required.
  7. phone is required.
  8. dni is required.
 
Your kind help & assistance is greatly appreciated.
 
Thanks & Rgds,
Fahmy
Edited by fahmyjalani (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...