Jump to content

Multiple Address Formats Please like Zen Cart


Recommended Posts

Having undertaken many Prestashop sites for UK based clients who mainly only sale in the UK, I have recently been working for a client who sells globally. This is where I found the limits of Prestashop, in that it has a set address format. Previously I have changed the code to suit the UK address format; however where there may be a number of address formats required, this is not possible.

What would be excellent is if Prestashop could resolve this in the same way that Zen Cart does by allowing you to set an address format depending on the country. So for France I can set as address format 1, US address format 2 and UK as address format 3. This truly makes Zen Cart an international commerce platform.

http://www.zen-cart.com/wiki/index.php/Table_address_format

The other benefit with Zen Cart is that if a country has no state, a blank field is opened up which allows manual entry. On Prestashop no manual state entry can be made, so if no states are defined for the country, then none can be manually entered.

This lack of international support is unfortunate as Prestashop is my product of choice when undertaken ecommerce sites, having moved away from Zen Cart quite a while ago.

Unfortunately I will have to move back to Zen Cart for this site. If anyone has any solutions to this then I would be very grateful in hearing from you.

Best regards

Link to comment
Share on other sites

  • 7 months later...

The ability to change the address format for each country now exists in version 1.4! Much more Asia friendly, as my shop is based in Japan and addresses in Japanese should read in reverse order to "Western" conventions:

 

(Postal code, prefecture (state), city, district, block and building/house number, family name, given name, title)

 

You can change the format for your country's addresses in your back office:

 

Back Office - Shipping - Countries - edit country and change Address Layout.

 

I've attached a screenshot of the layout I've set for Japan (I am using address 2 for Japan Prefecture, rather than the States field.)

 

Please note you MUST include "Country:name" in your address layout or you will get a "Fatal error" message when you try to update an address. I had a hard time figuring this out, but it is documented somewhere else in these online Prestashop helps, and that's how I solved the problem.

 

Like many, I've been wanting this feature for two years, so it is a welcome addition! Below is a my screenshot for my Japan layout.

 

Presta Address Formatting.png

Link to comment
Share on other sites

  • 2 months later...

I tried that and it doesn't adjust the address format

.

I still get:

 

firstname lastname

address

postalcode city

country (state)

telephone

 

I would like it to show up in this manner:

 

firstname lastname

address

city state postalcode

country

telephone

 

This is for the addresses.php page. I tried to fix the code by hand coding it but had no luck.

Can anyone help me with this please? I am using version 1.4.6.2

 

Thanks in advance.

Link to comment
Share on other sites

I tried that and it doesn't adjust the address format

.

I still get:

 

firstname lastname

address

postalcode city

country (state)

telephone

 

I would like it to show up in this manner:

 

firstname lastname

address

city state postalcode

country

telephone

 

This is for the addresses.php page. I tried to fix the code by hand coding it but had no luck.

Can anyone help me with this please? I am using version 1.4.6.2

 

Thanks in advance.

 

I am still having the same problem, were you able to resolve this, and if so, how?

 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

I agree, even though I change the format, it doesn't show up in that format at checkout.

However, the format changes a little when the Country is selected but since it is down in the list, they could be entering info that they don't need to based on the correct format for the country they choose.

 

authentication.tpl should be modified to query the country, first, and modify the format based on the stored address format. This isn't difficult to do with jQuery.

Link to comment
Share on other sites

It is already modifying the format in statesManagement.js in this code here:

   $('select#id_country').change(function(){
       updateState();
       updateNeedIDNumber();
       updateZipCode();
   });

 

There just needs to be a function written to build the address entry based on the format for the chosen country.

Link to comment
Share on other sites

×
×
  • Create New...