stevel Posted October 27, 2005 Author Share Posted October 27, 2005 You certainly could use this contribution for that purpose. Look back through this thread, it's been discussed before. As for your error, I would guess that you added some other contribution that allows you to selectively enable or disable countries and did not add the required field to the countries table. That is not related to Country-State Selector. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
jpldisplays Posted October 31, 2005 Share Posted October 31, 2005 Hi Eveyone!! I have had a look at this contribution and it is close to what I want to do, I am wanting something to go up one more level though!! Would it be possible to change it so it gives the user a list of suburbs once they have added there postcode?? We use a shipping system that validates the suburb with the postcode and we import batches of deliveries directly into it and we often get import errors when they do not match. If I can added the data into the zones table would it be possible to get it to select the correct suburb and state or would there be to many duplicates for each state as at the moment there is a unique record for each state, if I added the postcodes there would be hundreds of entries for each state.. Cheers!! Quote Link to comment Share on other sites More sharing options...
stevel Posted October 31, 2005 Author Share Posted October 31, 2005 Is there more than one suburb per postcode? Is the suburb used for anything other than addressing? (For example, determining tax or shipping rates?) It may be that adding zones is not the way to go. Rather, you could either ask the customer for just the postcode and do a lookup on suburb, or if there is more than one, present the customer with a list similar to the way the standard osC does it if the state is ambiguous. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
jpldisplays Posted October 31, 2005 Share Posted October 31, 2005 Hi Steve, Thanks for the reply!! There certainly could be more than one suburb for a postcode, it would not be used to calculate tax but I might use it for shipping rates if it will work in with the shipping module I am running.. Basically I want them to first enter their postcode and then get presented with a list of suburbs that match that postcode that they can select from. Quote Link to comment Share on other sites More sharing options...
stevel Posted October 31, 2005 Author Share Posted October 31, 2005 Ok, this is how I would handle it. I would have the postcode field have an "onblur" JavaScript action with a call to refresh_form, just the way the contrib calls refresh_form for a change in the Country field. Next, in the zones_query used for displaying the states (zones), I would add a condition to match the postcode, if it is present. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
dovlatyan Posted November 3, 2005 Share Posted November 3, 2005 Hi Steve! Can I use this contribution for creloaded 6.15? Thanks. Quote Link to comment Share on other sites More sharing options...
stevel Posted November 3, 2005 Author Share Posted November 3, 2005 I haven't the faintest idea. I have never looked at any of the repackaged versions of osC. The more your files diverge from the standard 2.2-MS2 distribution, the more work you will have to put in to adding the contribution - that applies for any modified versions of 2.2-MS2. The basic concept of Country-State Selector is not difficult, but it does require understanding the form processing logic of each page and adding the relevant refresh code. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
zboyblue Posted November 3, 2005 Share Posted November 3, 2005 There is little or no difference with CRE Loaded. I have it and have this installed. I don't remmeber any major issues. Craig Quote Link to comment Share on other sites More sharing options...
dovlatyan Posted November 5, 2005 Share Posted November 5, 2005 (edited) Deleted Edited November 5, 2005 by dovlatyan Quote Link to comment Share on other sites More sharing options...
dovlatyan Posted November 10, 2005 Share Posted November 10, 2005 Grate contribution, thank you! Just one thing, i ship only 3 countries. how can i set it up? Quote Link to comment Share on other sites More sharing options...
mustafa Posted November 10, 2005 Share Posted November 10, 2005 Grate contribution, thank you! Just one thing, i ship only 3 countries. how can i set it up? i ship only to my country, and i simply removed all other countries from database :) Quote Link to comment Share on other sites More sharing options...
dovlatyan Posted November 10, 2005 Share Posted November 10, 2005 i ship only to my country, and i simply removed all other countries from database but my customers from all over the world, we do flower deliveries. Quote Link to comment Share on other sites More sharing options...
stevel Posted November 10, 2005 Author Share Posted November 10, 2005 One way I suppose you could do this is customize the code used in checkout_shipping_address to limit the countries. Another way is to use zone shipping and include only your countries in the zone. That way, a customer won't be able to complete a purchase if the shipping address is not supported. That may confuse customers who entered the address seemingly ok, though. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
dovlatyan Posted November 10, 2005 Share Posted November 10, 2005 Hi Steve, Thanks for the reply!! I will try to customize the code used in checkout_shipping_address. And i got got error with refresh on: Line: 409 Char:1 Error:Object expected Code: 0 URL: http//flowers-armenia.com/create_account.php Any ideas? Quote Link to comment Share on other sites More sharing options...
stevel Posted November 10, 2005 Author Share Posted November 10, 2005 As I don't know what you changed, it's hard to say. This error indicates that there is a reference to an object (probably form) in the call to refresh which doesn't exist on that page. I'm sorry to say that I won't be able to help you debug this anytime soon. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Kristofor Posted November 13, 2005 Share Posted November 13, 2005 Hey guys, With the latest version, I am having trouble with the admin page noto refreshing. Is this right? E.g If I am on Australia and it shows the australian zone drop down in the admin and I changed the country to US or any other it doesnt re-fresh untill I click update at which point it re-freshes with the new list and then I cna choose from the new state list. is this right? Can someone help me get this to refresh thanks kris Quote Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere... Link to comment Share on other sites More sharing options...
stevel Posted November 13, 2005 Author Share Posted November 13, 2005 Please follow the troubleshooting tips in the readme. They usually help resolve this sort of problem. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2005 Share Posted November 19, 2005 How do I go about changing the DEFAULT country in the drop down list? -Roq Quote Link to comment Share on other sites More sharing options...
stevel Posted November 19, 2005 Author Share Posted November 19, 2005 See the README's instructions for edits to catalog/includes/languages/english.php Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Woody_CRF Posted November 24, 2005 Share Posted November 24, 2005 Just wanted to drop you a note and say thank you for this contrib. It rocks and works very well. Thanks again for all the hard work. I really appreciate it. Quote Just another Squirrel trying to get a nut :D Link to comment Share on other sites More sharing options...
stevel Posted November 24, 2005 Author Share Posted November 24, 2005 Thanks for the kind words. Enjoy. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
sfsfweb Posted December 1, 2005 Share Posted December 1, 2005 Great Contrib. except I had one problem. It was this error United States Postal Service United States Postal Service -2147219080 - Missing value for Country. Good thing i did a complete backup of all my files and was able to uninstall this contrib. I was using usps_shippinglabel_1.7c contrib. Just letting you know, the files in the two contribs dont clash, meaning none of the files in either contrib are the same. Hoping you would know how to fix this, heh I'm clueless. Thanks, Roger Quote Link to comment Share on other sites More sharing options...
sfsfweb Posted December 1, 2005 Share Posted December 1, 2005 Great Contrib. except I had one problem. It was this error United States Postal Service United States Postal Service -2147219080 - Missing value for Country. Good thing i did a complete backup of all my files and was able to uninstall this contrib. I was using usps_shippinglabel_1.7c contrib. Just letting you know, the files in the two contribs dont clash, meaning none of the files in either contrib are the same. Hoping you would know how to fix this, heh I'm clueless. Thanks, Roger I uninstalled your contrib and deleted my account then i reinstalled the contrib and it suddenly works!!! After I installed the contrib I then changed my country. I think it had something to do with which country was selected already in my account and how it was selecting the country in a different way? Not sure but it works now, hehehe Quote Link to comment Share on other sites More sharing options...
Sid04 Posted December 10, 2005 Share Posted December 10, 2005 i have v1.2.1 installed i downloaded new version to make sure I had the osc update done correctly in the new files. Noticed that catalog/admin/includes/functions/html_output.php has the following at the end: // +Country-State Selector // Adapted from functions in catalog/includes/general.php and html_output.php for Country-State Selector // Returns an array with countries // TABLES: countries function css_get_countries($countries_id = '', $with_iso_codes = false) { $countries_array = array(); if (tep_not_null($countries_id)) { if ($with_iso_codes == true) { $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "' order by countries_name"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name'], 'countries_iso_code_2' => $countries_values['countries_iso_code_2'], 'countries_iso_code_3' => $countries_values['countries_iso_code_3']); } else { $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "'"); $countries_values = tep_db_fetch_array($countries); $countries_array = array('countries_name' => $countries_values['countries_name']); } } else { $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name"); while ($countries_values = tep_db_fetch_array($countries)) { $countries_array[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']); } } return $countries_array; } //// // Creates a pull-down list of countries function css_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(); $countries = css_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } // -Country-State Selector ?> Mine doesnt have this.....should it? Did something totally change in newer versions? Quote Link to comment Share on other sites More sharing options...
stevel Posted December 11, 2005 Author Share Posted December 11, 2005 That's to support being able to use the state dropdown in admin when editing customer info. Version 1.2.1 doesn't have that, and it's optional. Quote Steve Contributions: Country-State Selector Login Page a la Amazon Protection of Configuration Updated spiders.txt Embed Links with SID in Description Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.