Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Country-State Selector


stevel

Recommended Posts

  • 3 weeks later...

Hi,

 

I have the country-state selector installed Version 1.06. I noticed there is recently a new version 1.1 whcih has better cross browser compatibility. Could someone let me know the changes that were applied? Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

There is a "World Zones" contribution that claims to do this. But I found that many of its entries were wrong (Australia), or for some countries (UK) incomplete. I can't recommend it as-is. If you would like to tackle updating and correcting it, that would be great.

Link to comment
Share on other sites

This contribution has no effect on tax zones.  All it does is provide a nicer way for the customer to select their zone.

 

Hi Steve,

 

I installed this contrib without any real big hitches. (Some of the copy paste I had to go back through in the create_account.php and adjust the lines, but other than that, no problem).

 

I have one issue and I could probably figure it out if I had the patience! :) When I click "Create an Account" and the form comes up, there are two pull down menus for the the country. There is one with no heading and the other says Country: before it. How can I remove one of them, preferrably the one with the Country: in front of it?

 

Thanks!

 

Julie

Link to comment
Share on other sites

Hi Steve,

 

What has happened is that some how my zip code (post code) area in the create account form is not coming up as an entry field, it's coming up as a pull-down for the country.

 

Julie

Link to comment
Share on other sites

Hi Steve,

 

Got it partially figured out but I ended up removing the "Country:" from the front of the selection box. :) I was going to wait for a reply from you, but once I have an error like that, I am impatient about getting it sorted! :) I am sure you can understand that. But, I am not sure how to add the "Country:" back in front of my selection box now. I have looked and cant find out what to do there.

 

Julie

Link to comment
Share on other sites

Julie,

 

All I can think of is that you made an error in the editing. In the ZIP file there are pre-edited files based on 2.2-MS2. Compare those to yours and see what is different.

Link to comment
Share on other sites

There is a contribution that was updated on 7 Dec 2004 (World Zones 1.7).  Is this the contribution you're referring to?

That is the contribution - I have not looked at the recent version, but I don't see in the edit comments that any of the problems I had found were fixed. It has been a while since I looked at this contrib.

 

I will caution people that this contrib replaces all the existing zones so that if you have zone IDs stored in any of the records, they will no longer be valid.

Link to comment
Share on other sites

Julie,

 

All I can think of is that you made an error in the editing.  In the ZIP file there are pre-edited files based on 2.2-MS2.  Compare those to yours and see what is different.

 

Thanks, Steve, I'll go through the files and see what I have there. I had some other edits in mine which is why I did not just copy over the other files. I'll look through and see what I can find.

 

Thanks!!

 

Julie

Link to comment
Share on other sites

  • 2 weeks later...

Hi Steve,

Just wanted to say, awesommmmme contrib that worked well on an american based osc.

 

I dont suppose you can change it a little to fit in with the UK Based Osc contrib at all if you get time?

 

Thanks

Link to comment
Share on other sites

Thanks for the kind words.

 

What exactly do you need to make it "UK based"? The contrib is really country-neutral - all you need is zones for your favorite country. You can rearrange the fields on the pages to your heart's content - I left them as they were in the stock OSC (which isn't exactly US-centric to begin with...)

Link to comment
Share on other sites

All they did was rearrange the order in which the form fields are displayed. The line numbers won't match up, but you should easily be able to see which sections to update. Compare to the standard 2.2-MS2 files if you need to. I suggest using Country-State Selector for the changes to the common files, and then rearrange the form fields (move postcode, etc.) as you like. The bug referred to does not occur if you use C-S Selector.

 

I will note with amusement that the contrib author thinks that the stock address layout is "US format" - it is not. Darned if I know what country it's good for, but it's all wrong for the US.

 

I will also caution you that loading the SQL file provided by the UK contrib will completely wipe out anything you have in your store, including products and customers. Nasty.

Edited by stevel
Link to comment
Share on other sites

All they did was rearrange the order in which the form fields are displayed.  The line numbers won't match up, but you should easily be able to see which sections to update.  Compare to the standard 2.2-MS2 files if you need to.  I suggest using Country-State Selector for the changes to the common files, and then rearrange the form fields (move postcode, etc.) as you like.  The bug referred to does not occur if you use C-S Selector.

 

I will note with amusement that the contrib author thinks that the stock address layout is "US format" - it is not. Darned if I know what country it's good for, but it's all wrong for the US.

 

I will also caution you that loading the SQL file provided by the UK contrib will completely wipe out anything you have in your store, including products and customers.  Nasty.

 

Hi,

Well you could look at it like that but theres a bit more than just rearranging the order of the form fields.

I cant easily see which sections to update.

 

I presume your not from the UK, the MS2 linstall IS very much more of a US format (other than the postcode being in the wrong place and not being called a Zip).

The following reasons are why the above is better as a new install (as it suggests its not a loaded install)- State, most people need more than 1 address line, the date format is wrong, UK counties, plus all the same in the admin section. All of which might seem easy to change for someone with a lot of PHP coding experience but its not for someone with only a little.

 

Thanks for this contrib.

Link to comment
Share on other sites

Ok, I looked closer. The only difference in the three overlapping files is the order in which the 'postcode' field is accepted. So you can use my edits for those files and just move the <tr></tr> containing the postcode input to wherever you want it. None of the other changes conflict. C-S Selector has no admin changes (although people have requested it...)

 

No, I'm not from the UK. But I am from the US and I know that the form order is wrong for the US as is the address format used. I've had to make a number of tweaks for my store to correct the errors, including adding fields to the address format feature. It's wrong for the UK too, I know.

Link to comment
Share on other sites

Hmm - well, the contrib doesn't affect the logic of that part. Looking at the code in general, I can see that it will do that if you did not select a shipping method on the checkout_shipping page.

Link to comment
Share on other sites

There is a contribution that was updated on 7 Dec 2004 (World Zones 1.7).  Is this the contribution you're referring to?

I have installed the world zones contrib, and I don't know of any problem except for a spelling mistake for the Australian Capital Territory. Could you please enlighten me regarding the errors for Australia and UK?

Link to comment
Share on other sites

It's been a while since I looked at it. At the time, none of the territory abbreviations for Australia matched official ones and the UK was missing a significant number of counties. Perhaps these errors have been corrected.

Link to comment
Share on other sites

Ive got Human confirmation v1.2 installed & the only part on the create_account.php file that i couldnt change was

catalog/create_account.php

 

Line 19

 

Replace:

 

  if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) {

    $process = true;

 

I havnt got that, instead ive got

// BOF // Contrib: Human confirmation v1.2

 $thecode_okay = false;
 $process_okay = false;
 $noautomationcode = $HTTP_SESSION_VARS["noautamationcode"];

 // -> v1.1 // Changed to work w/ random image names
 $img_dir  = $HTTP_SESSION_VARS["noautamationdir"];
 $img_name = $HTTP_SESSION_VARS["noautamationname"];
 // Find and delete old images
 if (strlen($img_name) >= 6) {
   $dirHandle = dir($img_dir);
   while($fileHandle = $dirHandle->read()) {
     if (substr($fileHandle,0,strlen($img_name)) == $img_name)
       @unlink($img_dir.$fileHandle);
   }
   $dirHandle->close();
 }
 // <- v1.1 // Changed to work w/ random image names

$thecode_okay = (isset($HTTP_POST_VARS['thecode']) && ($HTTP_POST_VARS['thecode'] == $noautomationcode ));
$process_okay = (isset($HTTP_POST_VARS['action'])  && ($HTTP_POST_VARS['action'] == 'process'));

if ( ($process_okay == true) && ($thecode_okay == true) ) {
// EOF // Contrib: Human confirmation v1.2
  $process = true;

Any idea how i can put the 2 together?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...