Jump to content
stevel

Country-State Selector

Recommended Posts

Ok. In checkout_payment_address.php and checkout_shipping_address.php, make these edits:

 

Try this and let me know how it works for you.

 

stevel,

 

Thanks for the code updates. Sorry it took me a while to get them implemented. So far, initial testing is good so it seems to work as I'd expect. Again, thanks!!

 

Nathan

Share this post


Link to post
Share on other sites

When I change the country it submits the account instead of refreshing the page. What's wrong?

Share this post


Link to post
Share on other sites

I have a create_account.php with an older version of this contrib installed that works on another site, if I paste it into the site I'm having problems with it still doesn't work. It must be another file that create_account.php uses...

Share this post


Link to post
Share on other sites

The onChange attribute of the country pulldown causes a "refresh" function in includes/form_check.js.php to be called. This changes the action from "process" to "refresh". Either that's not there or you've got an error in the code at the top of create_account.php that looks for the action value.

Share this post


Link to post
Share on other sites

I replaced my create_account.php with the one that came with the contrib and now it works. Strange because in the comparison in CSDiff that I made, the only differences were white space and something to do with the email text.

Share this post


Link to post
Share on other sites

Hi there.

I have a problem with a multiple drop down box in checkout_shipping_address.php when i try to add a new address.

Can anyone help me on this.

 

Thank you.

Share this post


Link to post
Share on other sites

Hi, Can anyone help me? I'm going mad trying to figure this out. I installed this contribution this afternoon and when I clicked on create a new account all I got was this:

 

Fatal error: Cannot redeclare tep_show_category() in /home/trixie/trixiecat.com/catalog/includes/boxes/categories.php on line 13

 

I built my entire site and used the forums as a guide on the php. I hate php but I honestly do not get it. I just wanted a pull down menu with all the US states and have the united states as the default. Is that so wrong? :(


I used to take a pill for that but now I just don't care

Share this post


Link to post
Share on other sites
Well, I can't see how this would relate to the contribution. Do you have the categories box included twice in your left column (or wherever it is)?

 

No, but thanks for asking. Actually it was tep_show_catagory.... it should have been tep_show_catagories. I cruised through the file and changed it all and now it works just fine. Beautiful contribution.


I used to take a pill for that but now I just don't care

Share this post


Link to post
Share on other sites

To install this contrib, I am right in saying download the version 1.3.3 from the osc contribs page and then add the modifications of post 597 of this thread?


Stuart

Share this post


Link to post
Share on other sites

Installed version 1.3.3 and edits from post 597 of this thread and all works fine.

 

A BIG THANK YOU


Stuart

Share this post


Link to post
Share on other sites

I just noticed that the page no longer refreshes after someone changes the category. According to my backups and the file modified date, I've never touched the file since it was working. I'm pretty sure this has to do with me upgrading to PHP5. Can anyone help?

Share this post


Link to post
Share on other sites

Ok it wasnt the php upgrade, since the other site I run on the same server with the same mod installed is working perfectly. Is there a common thing I should check to fix this?

Share this post


Link to post
Share on other sites

Read the README for debugging tips. Basically, view the HTML source in your web browser and make sure that the "refresh" function is there. If you have Firefox, bringing up Tools..Javascript Console is a great help as it will usually tell you exactly what is wrong.

Share this post


Link to post
Share on other sites

Update: It was the blank minimum value for the telephone number that caused this. The way to make the telephone number not required (according to someone on the forums) is to set the minimum value to blank and edit a piece of code.

 

On another note, do you know if this mod breaks the error checking on the create account page, particularly if another email already exists, or if the person didnt enter the password correctly in the confirm box? That isnt working for me right now, and I'm trying to figure out if it's this mod or the member approval mod. The whole problem has been giving me hell. I'm losing customers because the page isnt checking for errors like that and it tells the people their account request was submitted, but we hear nothing about it and they never get their account. (It will check minimum values though.)

Edited by yatahaze

Share this post


Link to post
Share on other sites

The site still gives me an error saying "Your telephone number must be a minimum of 0 characters". Too bad about the breaking though, I was really hoping this is what caused it.. heh.. The member approval mod has almost no support.

Share this post


Link to post
Share on other sites

Well, you can always take the "big hammer" approach and comment out the check for telephone number in includes/form_check.js.php

 

And yes, any error in that file may prevent the country-state selector refresh from occurring as browsers will stop running code in the script after an error.

Share this post


Link to post
Share on other sites

Everything seems to work when I installed this mod, but when trying to access "Customers" menu choice from Admin (or search for customer name), I now get this:

 

Parse error: parse error, unexpected T_CASE in /usr3/home/cupandblade.com/htdocs/store/catalog/admin/customers.php on line 194

 

Here is the code snippet from that location in my customers.php file:

 

} else if ($error == true) {

$cInfo = new objectInfo($HTTP_POST_VARS);

$processed = true;

// +Country-State Selector

} else if ($refresh == 'true') {

$cInfo = new objectInfo($HTTP_POST_VARS);

}

// -Country-State Selector

}

 

Any help??

Share this post


Link to post
Share on other sites
Everything seems to work when I installed this mod, but when trying to access "Customers" menu choice from Admin (or search for customer name), I now get this:

Here is the code snippet from that location in my customers.php file:

Any help??

 

D'OH!!! I just re-read posts on the previous page and removing the brace between the comment and "break" solved it. Sorry for reposting the problem, I would have deleted the post if I could have.. :wacko:

Share this post


Link to post
Share on other sites

Hi Steve,

 

After many hours of trying to find a simple fix to the entire Country/State issue when someone signs up for an account, I later realized there is no simple fix. I was hesitant to use your setup because of all the customization I did to my store. However, many of your files do NOT interfere with customized store files.

 

Your contribution is a real asset to the osCommerce cart and I hope they integrate it into the core files. It was easy to setup and solved all my problems. I immediately saw results with my first international order coming just 2 hours after installing your contribution. No wonder I wasn't getting any international orders before. The core files just don't work in the current release.

 

If you're hesitant to use Steve's contrib, just view my cart at: www.stickypod.com/osc/ and you'll see that I'm using multiple style sheets and many customized OSC files.

 

Many thanks for all the hard work and you have my vote for including your contrib in the core files. :thumbsup:


Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

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

×