Jump to content
stevel

Country-State Selector

Recommended Posts

Thanks for that .. appreciate it.

 

I have just one more prob. When i click on Create new Account and goes to the screen to enter all my details. Well the blue indicator.gif shows up on the top left hand corner. it goes away when i change country. How do i fix this please? Because the indicator.gif is supposed to be called when changing countries and its loading the states pull down menu, i understood thats when its supposed to have appeared but this appears whenever you click on Create New Account and remains showing until you change countries.

Edited by CGhoST

Share this post


Link to post
Share on other sites
Thanks for that .. appreciate it.

 

I have just one more prob. When i click on Create new Account and goes to the screen to enter all my details. Well the blue indicator.gif shows up on the top left hand corner. it goes away when i change country. How do i fix this please? Because the indicator.gif is supposed to be called when changing countries and its loading the states pull down menu, i understood thats when its supposed to have appeared but this appears whenever you click on Create New Account and remains showing until you change countries.

 

 

Doenst seem like you added the CSS tag for the indicator.. create one and add the value 'visibility: hidden;' it will start off as hidden and should show up when its loading..

 

#indicator {
visibility:hidden;
}

 

you can modify it as you see fit for your page..

 

J

Share this post


Link to post
Share on other sites

I just installed version 1.5.5 and it seems to be working okay, except I get the following error on admin/customers.php which normally means I made a mistake, right?

Parse error: syntax error, unexpected T_CASE in /path/to/admin/customers.php on line 221

Line 221 for me is:

	  case 'deleteconfirm':

but the problem could be anywhere. I went thru it twice and it "looks" right, but I'll have to try again.

 

My question is, what functionality does this contrib add to customers.php, and is it necessary?

 

Also, is it designed behavior to have the numeral "1" added to State/Province when it goes to manual entry?

 

Thanks,

 

JG


osC v2.2 RC2a w/ no special templates

PHP Version 5.2.14 / MySQL 5.0.91-community

Share this post


Link to post
Share on other sites

Okay, I removed the contrib from the Admin area... it's just not necessary IMHO.

 

FWIW, I believe the error had something to do with this (adding the } ):

Line 152:

Replace:

  if ($error == false) {

with:

// +Country-State Selector	  
  }  // End if (!$refresh)	
  if (($error == false) && ($refresh != 'true')) {
// -Country-State Selector

Edited by jgeoff

osC v2.2 RC2a w/ no special templates

PHP Version 5.2.14 / MySQL 5.0.91-community

Share this post


Link to post
Share on other sites
Okay, I removed the contrib from the Admin area... it's just not necessary IMHO.

 

FWIW, I believe the error had something to do with this (adding the } ):

Line 152:

Replace:

  if ($error == false) {

with:

// +Country-State Selector	  
  }  // End if (!$refresh)	
  if (($error == false) && ($refresh != 'true')) {
// -Country-State Selector

 

 

jgeoff

 

open the file catalog/create_account.php

 

at the top.. change

 

ajax_get_zones_html(tep_db_prepare_input($_POST['country']), true);

 

to

 

ajax_get_zones_html(tep_db_prepare_input($_POST['country']), '');

 

I will make those changes and upload a new version.

 

that will get rid of the 1 showing up a default in states without predefined zones..

 

J

Share this post


Link to post
Share on other sites
jgeoff

 

open the file catalog/create_account.php

 

at the top.. change

 

ajax_get_zones_html(tep_db_prepare_input($_POST['country']), true);

 

to

 

ajax_get_zones_html(tep_db_prepare_input($_POST['country']), '');

 

That makes most of the code (until the HTML) turn grey if I do that, in Notepad++, so that doesn't seem exactly right, syntax wise...?


osC v2.2 RC2a w/ no special templates

PHP Version 5.2.14 / MySQL 5.0.91-community

Share this post


Link to post
Share on other sites
That makes most of the code (until the HTML) turn grey if I do that, in Notepad++, so that doesn't seem exactly right, syntax wise...?

 

not sure why.. you are only replacing the ,true); with ,''); (two single quotes) .. this should work my friend..

Share this post


Link to post
Share on other sites

Thanks insaini

 

This contrib works GREAT for me now. Either be catalog or admin side. Appreciate all your help.

 

Thanks again

Share this post


Link to post
Share on other sites
not sure why.. you are only replacing the ,true); with ,''); (two single quotes) .. this should work my friend..

 

My bad: I thought that was a double-quotation mark (") :blush:


osC v2.2 RC2a w/ no special templates

PHP Version 5.2.14 / MySQL 5.0.91-community

Share this post


Link to post
Share on other sites
My bad: I thought that was a double-quotation mark (") :blush:

 

well actually.. you dont even need that heh.. the two single quotes '' argument is default .. so you dont even need to pass it..

 

J

Share this post


Link to post
Share on other sites
Hi Guys,

 

Ive got the script workingon all my other pages, except for my create_account.php.

 

I have compared, copied, double checked and done it all again, to no success!

 

check it out: http://icustom.ca/create_account.php

 

Any ideas??

 

Best,

Aaron

 

There is a javascript error.. getStates is not defined.. seems like you didnt attached the ajax.js.php file to create_account.php .. and yup just checked the page source.. the javascript required isnt there..

Share this post


Link to post
Share on other sites
My question is, what functionality does this contrib add to customers.php, and is it necessary?

 

The general idea is that if you want to edit the customer record, it is nice to have the same zone dropdown feature as in the store. As I indicated in my version, this is entirely optional.

Share this post


Link to post
Share on other sites

Hi,

 

Has anyone managed to get this interesting looking add-on to work in conjunction with a recent version of "Fast Easy Checkout" and "Autoupdate Cart"?

 

I can't get it to work at all, but I know virtually nothing about coding.

 

As I have FEC installed, I assume that the edit in create_account.php should go in which ever version of create_account.php (1, 2 or 3) I choose to use. But the bits that I'm supposed to edit in the FEC version of create_account.php are different to the standard one, and though I've tried to guess which bits to edit it still didn't work, so I've uninstalled the Country-State selector for the time being.

 

But if someone has got the Country-State selector to work with FEC, and is willing to share how they did it, I'll give it another try. I suppose I could do without the Autoupdate Cart add-on, if I had to (as I suspect it may interfere with the Country-State selector add-on), though I do think it's very useful.

 

Thanks for reading this,

Dave.

Edited by Davefromcornwall

Share this post


Link to post
Share on other sites

Hi Dave,

 

If your from UK, I`ve done a simpler package at http://addons.oscommerce.com/info/5889 that might do for you.

 

 

 

:thumbsup:


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
Hi Dave,

 

If your from UK, I`ve done a simpler package at http://addons.oscommerce.com/info/5889 that might do for you.

:thumbsup:

Yes, I've had a look at your add-on, and it looks good, but we do want to sell worldwide and the Country-State selector would suit that better, if I could get it working.

Share this post


Link to post
Share on other sites

I'm having a few problems with certain customers and I have no idea how it can be happening and I hoped someone might be able to sched some light on the issue.

 

I'm using the ajax version, but I'm not sure if the problem is particular to this version or not.

 

I have some customers who's state is recorded incorrectly when they place thier order.

 

E.g. I have just had a customer from the UK in Helston, so they should have chosed Cornwall from the state dropdown but their state is recorded as Northwest Territories, which is infact in Canada.

 

I've quite a few other customers with similar problems and I have been unable to recreate it myself.

 

Does anyone have any ideas?

 

Thanks

 

Dave

Share this post


Link to post
Share on other sites

I think I've sussed it, these are existing customers and I have reorganised my zones recently so I think its because the zone_id's have changed.

Share this post


Link to post
Share on other sites
Also, is it designed behavior to have the numeral "1" added to State/Province when it goes to manual entry?

 

How to show empty field instead of "1"

Share this post


Link to post
Share on other sites

Is there a fix for the "unexpected T_CASE" in customers.php?

 

I've seen lots and lots of people with this problem but no one is posting a fix. Please help.


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites
Is there a fix for the "unexpected T_CASE" in customers.php?

 

I've seen lots and lots of people with this problem but no one is posting a fix. Please help.

 

I found the problem, and posted the bug fix to the addons page.

 

The problem was in the README.HTM file, it added an extra "}" in /admin/customers.php, fix is here:

 

Line 152:

Replace:

// +Country-State Selector	  
  } //  End if (!$refresh)	
  if (($error == false) && ($refresh != 'true')) {
// -Country-State Selector

with:

// +Country-State Selector	  
   //  End if (!$refresh)	
  if (($error == false) && ($refresh != 'true')) {
// -Country-State Selector


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
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

×