Guest philoye Posted October 11, 2007 Share Posted October 11, 2007 I'm not going to ship to all 200+ countries that are listed in the default install of CC. What's the best way to disable some? Do I need to delete them altogether? Seems like a shame. If I open it up to other countries in the future, I need to manually re-enter? I guess it isn't the worst thing in the world. It seems like there should be disable/enable functionality (similar to currencies). Quote Link to comment Share on other sites More sharing options...
Guest webicon Posted October 12, 2007 Share Posted October 12, 2007 If you have CPanel/PHP MyAdmin or similar the easiest would be to edit the table directly. I only deliver to Uk so I empty all rows except UK... 2 minute job. If I changed my mind I would just re-import the default table contents again.... Quote Link to comment Share on other sites More sharing options...
Guest philoye Posted October 12, 2007 Share Posted October 12, 2007 If you have CPanel/PHP MyAdmin or similar the easiest would be to edit the table directly. I only deliver to Uk so I empty all rows except UK... 2 minute job. If I changed my mind I would just re-import the default table contents again.... So deleting is the way to go, I guess. Good idea on backing up the table first though! Quote Link to comment Share on other sites More sharing options...
Robo_1 Posted October 12, 2007 Share Posted October 12, 2007 I just remove the language folders directly from the store. Seems to work, and if you're not comfortable editing tables, then it's the next best thing. Quote Link to comment Share on other sites More sharing options...
Guest webicon Posted October 12, 2007 Share Posted October 12, 2007 So deleting is the way to go, I guess. Good idea on backing up the table first though! ALWAYS! :dizzy: Quote Link to comment Share on other sites More sharing options...
Guest philoye Posted October 12, 2007 Share Posted October 12, 2007 Well, I deleted countries the "old fashioned way"--via the admin tool. Alas, as with any error prone activity, I fat-fingered a few. I deleted two countries that I didn't mean to. No problem, I thought, I simply added them back. Wrong. Now those two countries appear at the end of the country drop down on the front-end. Even though I manually edited the ID column on the database itself to their original values, they still come at the end of the list. Curiously, they are in the right order in the admin tool. Perhaps the SQL query that is pulling the countries on the front end, differs from the admin tool? Any suggestions? Is there a SQL command that'll resort the rows in the table? Or I can modify the CC php file that drives the registration screen. Either way, it would seem this is a bug. If people add/remove countries, they should still show up in alpha order in the front-end. Any help, would be appreciated. Quote Link to comment Share on other sites More sharing options...
Guest bennyuk Posted October 12, 2007 Share Posted October 12, 2007 I think I had this with v3 as well. To get round it you need to edit each inc file that is used on whichever page you are referring ot. The main one is the registration page, the inc file is /includes/content/reg.inc.php Have a look around line 340 where it says $countries = $db->select("SELECT id, printable_name FROM ".$glob['dbprefix']."CubeCart_iso_countries"); and change it to $countries = $db->select("SELECT id, printable_name FROM ".$glob['dbprefix']."CubeCart_iso_countries ORDER by printable_name "); ie get it to order by country name rather than the id number. Just remember to take backups of any files before editing them :dizzy: Quote Link to comment Share on other sites More sharing options...
Guest philoye Posted October 13, 2007 Share Posted October 13, 2007 $countries = $db->select("SELECT id, printable_name FROM ".$glob['dbprefix']."CubeCart_iso_countries ORDER by printable_name "); ie get it to order by country name rather than the id number. That worked like a charm, thanks! (or at least once I cleared the SQL cache via the admin tool). Cheers! p. Quote 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.