News:

Looking for documentation? Take a look on our wiki

Main Menu

UK & European Counties etc

Started by Kev3L, February 17, 2015, 17:11:08 PM

Previous topic - Next topic

Kev3L

Over here in the UK, "State" (or indeed ZIP) are not used.  My client wants me to do one of two things, and I have wasted 2 days working on various threads and suggestions and pulling my hair out!

We either need to import ALL the counties/regions etc for the whole of Europe into the database, so that customers who choose a European country can actually choose their region.

OR

I need to change the County (STATE) from a SELECT (dropdown) to a "Text" field instead. So that customers can type their own county/state/region.

I found some articles where people have done this, but they were either REALLY old versions of VM, or they didn't elaborate on what files they were changing.


I'm also struggling to change the order of the fields in the ship to or bill to area. Ideally they should be:

Address1
Address2
City
County
Postal Code
Country

But at the moment they are:

Address1
Address2
Postal Code
City
Country
County

The sort order in the "shopper fields" screen doesnt seem to actually do anything. You type in a position you want it to appear in (ie 1) press Enter - screen refreshes and the field is still in the same place.

I have already successfully removed United Kingdom, replaced it with its countries and imported the related counties. However, I couldnt find lists for the whole of Europe.



Demo site can be found here:
http://www.3lsolutions.co.uk/test/sjs

Virtuemart v3.0.2
Joomla 3.3.3


I have been wading through php files for hours and hours, and not really getting anywhere. But I am more than happy to implement code changes if somebody can point me in the right direction :)  I'd prefer to make changes in the template overrides - but I know changes will also need to be made in the com_virtuemart folder too.

I must admit I am REALLY surprised that Virtuemart doesnt include all the Counties/Regions etc already... because they are forcing you to use the selector box option. If they made it easy to switch it to a text field, that would make sense. But as we are stuck using a dropdown - it should really be populated/working?

I can add a custom shopper field - but that doesnt appear in the Bill To/ Ship To address form... so thats not an option unfortunately.

Any help or pointers greatly appreciated.

Kev

AH

#1
QuoteOver here in the UK, "State" (or indeed ZIP) are not used.  My client wants me to do one of two things, and I have wasted 2 days working on various threads and suggestions and pulling my hair out!

Just delete the UK states from the UK

Disable the virtuemart_state_id shopperfield (red dots across all config options)

Quote
The sort order in the "shopper fields" screen doesnt seem to actually do anything. You type in a position you want it to appear in (ie 1) press Enter - screen refreshes and the field is still in the same place.

Click the little save disk icon next to "reorder" to save the change of sequence
Regards
A

Joomla 4.4.5
php 8.1

Kev3L

 :-X
{speechless}
Cant believe I missed the little save button! lol. Ok thats works a treat thank you very much. :)  Its counter-intuitive because throughout Joomla (and indeed 99% of third-party components I have used), the "Save" button at the top of the screen saves any changes.

As for disabling the counties... thats actually a great workaround! I'll rename the "City" field label to "Address 3".  That way, people can put things like "Maidstone, Kent" in the field.

Its a shame I cant make use of the county field properly - but thats a good workaround thank you.


jenkinhill

You can add the States/Counties if you wish. WE used to have England/Wales/Scotland/Ireland as the UK states but following comments from people who wanted to use county names the prepopulated states were removed allowing a site developer to add in whichever ones needed, if necessary. Easy enough to do.  http://forum.virtuemart.net/index.php?topic=116453.msg392685#msg392685
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

AH

We use this for UK address lookup using postcode (the service is not free but it works great and really save errors on customer input!)

https://craftyclicks.co.uk/plugins/download-info/virtuemart/

You have to sort the input links so the country is first then the postcode (if postcode is at the end of the address, people dont get the benefit of using lookup in place of typing the address manually!)
Regards
A

Joomla 4.4.5
php 8.1

Kev3L

Quote from: Hutson on February 20, 2015, 00:32:28 AM
We use this for UK address lookup using postcode (the service is not free but it works great and really save errors on customer input!)

https://craftyclicks.co.uk/plugins/download-info/virtuemart/

You have to sort the input links so the country is first then the postcode (if postcode is at the end of the address, people dont get the benefit of using lookup in place of typing the address manually!)

Thats an interesting plugin. I'll mention that to my client, thanks for the heads up.  8)