Jump to content
stevel

Country-State Selector

Recommended Posts

www.fabricmall.co.uk

There is an error showing on line 421 of create_account.php

 

What have you got on that line?

 

Very nice site by the way...... it's the first time I have seen arabic language added to an oscommerce store... I know where to come if/when I need to have the arabic language installed :thumbsup:


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Yes, there's an error, but it won't be at line 421 of the PHP file, and the actual error isn't even line 421 of the generated HTML.

 

In includes/form_check.js.php it generates the following java script:

 check_radio("gender", " <B><font color="red">خطأ: لقد نسيت اختيار الجنس</font></B>");

 

You have added the font tag wth color="red" to the error message texts. You can't do that - it interferes with the use of "" to delimit the string.

Share this post


Link to post
Share on other sites
Yes, there's an error, but it won't be at line 421 of the PHP file, and the actual error isn't even line 421 of the generated HTML.

 

In includes/form_check.js.php it generates the following java script:

 check_radio("gender", " <B><font color="red">خطأ: لقد نسيت اختيار الجنس</font></B>");

 

You have added the font tag wth color="red" to the error message texts. You can't do that - it interferes with the use of "" to delimit the string.

:thumbsup: :thumbsup: :thumbsup:

Fabulous....

I edited arabic.php, working correctly now.

thanx Steve

Share this post


Link to post
Share on other sites
There is an error showing on line 421 of create_account.php

 

What have you got on that line?

 

Very nice site by the way...... it's the first time I have seen arabic language added to an oscommerce store... I know where to come if/when I need to have the arabic language installed :thumbsup:

thanks Chooch

the error comes from the arabic.php files i downloaded from oscommerce, the guy who translated this version added color codes to the language file which as Steve says conlicts with form_check.js.php, when removing these codes the country-state-selector works fine..

Share this post


Link to post
Share on other sites

If you wanted, you could simply remove the quotes around "red" and it would work.

 

I have seen this issue before and the problems it causes are often very far away from the source of the problem.

Share this post


Link to post
Share on other sites
If you wanted, you could simply remove the quotes around "red" and it would work.

 

I have seen this issue before and the problems it causes are often very far away from the source of the problem.

Steve, you the man :thumbsup:

 

I have never seen anyone with any question related to CSS not receive help or guidance from you. By the way, keeping everything in the red in mind, the reason I said line 421 was because of the yellow triangle in IE.. how did you clock on to the location of the error accurately?


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

421 was the line of the generated HTML where the browser noticed a problem. Note that it's not the line number of the PHP file, because the browser has no clue about that.

 

Firefox gave me the line 421 (which contained the call to refresh_form) but also displayed the start of the JavaScript function call that it said was bad, which was much earlier in the file. I simply searched for that and recognized the problem, having seen it before (though the first time it drove me bonkers trying to figure it out.)

 

Thanks for the kind words. I try to help if it looks even remotely related to C-SS.

Share this post


Link to post
Share on other sites
Thanks for the kind words. I try to help if it looks even remotely related to C-SS.

The pleasure is all mine Steve, you are very dedicated and always spare the time to run this thread so a thank you was truly well over due!

 

I'll take this opportunity to wishh you and all the thread & osc users the best for 2007!

 

And thanks for HTML generated tip... I'll keep that in mind for when i have errors. Sometimes focusing on small things like that make you find a different approach to fixing problems - thus saving time.

 

Cheers.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi Steve,

 

I have just had to change my host and they are using php5. I've fixed all of my register_globals problems (that I've come across so far) but when I was trying to add a new address to my address book it skips right through address_book_process and back to address_book. It has automatically added a new address but it is blank. The only changes I've made to the stock file is to add the header tags contrib and C-SS. I've tested it with just the header tags changes and it works fine so I am guessing there is a problem with C-SS.

 

I looked back at all the posts into 2005 but I didn't see anything about this (sorry if I didn't go back far enough). Is this something you can help me with? I've been using your contribution for the last couple of years and its great.

 

Thanks

Share this post


Link to post
Share on other sites

Stephen,

 

I have disabled register_globals on my store, though I don't use PHP5, and have not had a problem. Does the Create Account page work? That it added a blank address suggests that the form fields are not being passed through. Offhand, I don't know what might cause this. If it were my store, I'd try adding some debugging code to show me the contents of $_POST when the form gets submitted. If it's completely blank that means it's also passing the PHP code tests for validity at the top of the file, so something else is going awry.

Share this post


Link to post
Share on other sites

Thanks Steve,

 

I just figured it out. I was missing $process = true; on line 40. I couldn't see the wood for the trees as I'd been looking at the code for too long. A couple of hours later and a fresh pair of eyes and there it was.

 

Cheers

 

Steve

Share this post


Link to post
Share on other sites

Is there a list of Countries that have States that are included in this contribution? Thanks

Share this post


Link to post
Share on other sites

This contribution does not "include" any states. It works off of the Zones table. Go to your store's admin panel and look at the set of defined Zones.

 

There is a contribution, called "World Zones", I think, that adds zones for many more countries. I have not looked at this for a while, but last I did, I found that some countries had an incomplete list of zones, some had incorrect zones and some had wrong abbreviations (UK and Australia were two that I found problematic.) This was a while ago and it may have been improved since then. Also note that if you use this contrib, any zone IDs you currently have recorded will be obsolete and need to be rebuilt.

Share this post


Link to post
Share on other sites

Hi guys great conytibution, but i have one problem when the client enter in my account information --> My account-->View or change my account information. , and then he go try to change is details it appears a sucess mensage Your account has been successfully updated. but the client dont do nothing the mensage appears directly.

 

some now how to fix this???

 

Thanks,

Ricardo

Share this post


Link to post
Share on other sites

Post your question in the general support section of the forum. It would be helpful to know if the "success" message happens as soon as the customer brings up the page (before clicking on the submit button) or after they submit the form.

Share this post


Link to post
Share on other sites

Hi!

Its the second time that I use this contribution. The firs time it works excellent but this second time i had a problem (hope you guys understand may english, if not then i had another problem :) ).

Got this error un the admin:

 

 

Parse error: syntax error, unexpected T_CASE in /home/flyjumpe/public_html/shop/admin/customers.php on line 191

 

I know that is for the CASE but i'm lost and i can't find the form to fix it.

Share this post


Link to post
Share on other sites

Hi!

Its the second time that I use this contribution. The firs time it works excellent but this second time i had a problem (hope you guys understand may english, if not then i had another problem :) ).

Got this error un the admin:

 

 

Parse error: syntax error, unexpected T_CASE in /home/flyjumpe/public_html/shop/admin/customers.php on line 191

 

I know that is for the CASE but i'm lost and i can't find the form to fix it.

Share this post


Link to post
Share on other sites

Oh That is!!! Thanx.

 

But i have another one on the same file.

When i try to modify one user in the Admin interface i got this error:

Fatal error: Call to undefined function: css_get_country_list() in /home/flyjumpe/public_html/shop/admin/customers.php on line 612

 

and the country selector is not show.

Share this post


Link to post
Share on other sites

And this is the line:

 

// +Country-State Selector

echo css_get_country_list('entry_country_id', $cInfo->entry_country_id,'onChange="return refresh_form(customers);"');

// -Country-State Selector

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

×