Guest saturnnights Posted March 26, 2006 Share Posted March 26, 2006 This post died a quiet death in the shipping forum, so maybe it didn't belong there? Anyway, I'd like to restore all of my default shipping countries - how can I do that? Is there a file that I need to replace? In my haste, during initial setup, I deleted a few countries and now I'd like to get all of them back... Thanks! Mark Quote Link to comment Share on other sites More sharing options...
convict Posted March 26, 2006 Share Posted March 26, 2006 DB schema with initial DB content is in CC package: upload/install/db/schema.inc.php Restoring depends to how many countries you want to get back. IF few just rip appropriate INSERT lines like $db->misc("INSERT INTO `".$_POST['dbprefix']."CubeCart_iso_countries` VALUES (238, 'ZM', 'Zambia', 'ZMB', 894);"); make proper SQL, run it in MyPhpAdmin .... ----------------------------------------------- IF all, prepare and upload sritpt like this: <?php include_once("includes/ini.inc.php"); include_once("includes/global.inc.php"); include_once("classes/db.inc.php"); $db = new db(); // rip all countries, counties lines here like $db->misc("INSERT INTO `".$_POST['dbprefix']."CubeCart_iso_countries` VALUES (1, 'AF', 'Afghanistan', 'AFG', 4);"); $db->misc("INSERT INTO `".$_POST['dbprefix']."CubeCart_iso_countries` VALUES (2, 'AL', 'Albania', 'ALB', 8);"); $db->misc("INSERT INTO `".$_POST['dbprefix']."CubeCart_iso_countries` VALUES (3, 'DZ', 'Algeria', 'DZA', 12);"); . . . . . ?> Empty CubeCart_iso_countries(counties) table contents and run your script. Hope all is clear :) Quote Link to comment Share on other sites More sharing options...
Guest saturnnights Posted March 26, 2006 Share Posted March 26, 2006 Oh my gosh... It's that difficult? Rats... I was hoping it was something simple. Well, heck, I'm not even sure which countries are gone! I'm so dumb... I was trying to get the UPS module to work and thought that if I just got rid of everything but USA and Canada, my life would be easy. I started to delete and then had second thoughts a few deletions into it. I know that Austria is gone, but I'm not sure who else. Drat, drat, drat.... Okay, here are two questions: 1) What is the relation/difference between "Countries" and "County/State/Zone" in the Countries and Zones configuration? There are countries listed in both and I can't figure out what each does? 2) Where is a good source of this information if I want to enter the ones I need to enter? Is the USPS the best source? Thanks, Mark Quote Link to comment Share on other sites More sharing options...
convict Posted March 28, 2006 Share Posted March 28, 2006 "Countries" and "County/State/Zone" are related. County table contains a countryId to know what conty belongs to country. If you select a country, county drop down box is full of country counties if any If you have deleted some Country which has Counties, nothig happens if you dont need this country, in other case you are in trouble especialy you are not sure what country is missing. Counties here are for different taxes, fees mainly. Quote Link to comment Share on other sites More sharing options...
Guest saturnnights Posted March 28, 2006 Share Posted March 28, 2006 If I add the countries back, with the counties and whatnot come along? Or are those separate? Quote Link to comment Share on other sites More sharing options...
Guest saturnnights Posted March 28, 2006 Share Posted March 28, 2006 I can't find this info anywhere!?!?!?! The USPS doesn't list it and a Google search didn't work... Would anybody with a couple of spare minutes mind posting the Country/shipping info for Austria? Thanks Mark Quote Link to comment Share on other sites More sharing options...
Guest SafeTomorrow Posted October 20, 2006 Share Posted October 20, 2006 Hello... I know this thread is a few months old but I thought I could help in the future. I had the same problem. I thought I was going to only sell to certain countries so I deleted a bunch, but things have changed and I wanted them back.. I made a script simular to the guy above, but more user friendly. All you have to do is download this restore.php file and put it in your cubecart main directory. Then, go to www.yoursite.com/restore.php. The directions will show up on the screen when you go to that URL. Basicaly, there are two functions. Delete and Restore. Type "delete" in the text box and click the execute button, and it will delete all entries in the countries and counties. Then type "restore" and click execute, and all of the countries and counties will return to the default settings that are there when you first install cubecart. THIS WILL NOT DELETE ANYTHING OTHER THAN "COUNTRIES" AND "COUNTIES" SO YOU DONT HAVE TO WORRY. Even then, it is still safe to have a backup of your database. You MUST delete before you restore, or you will get a "duplicate entry" error. Here ya go...enjoy. B.T.W. this, or something simular, should be built into cubecart.. extra functions never hurt a program.restore.php Quote Link to comment Share on other sites More sharing options...
Guest cudovich Posted December 20, 2006 Share Posted December 20, 2006 This didn't work for me. When I hit delete and execute I get a 404 error: The page you are looking ( /bowl/testing.php) for might have been removed, had its name changed, or is temporarily unavailable. I checked and the countries are not back....any other ideas? Or am I doing something wrong? thanks! -jc Quote Link to comment Share on other sites More sharing options...
Guest SafeTomorrow Posted January 17, 2007 Share Posted January 17, 2007 This didn't work for me. When I hit delete and execute I get a 404 error: The page you are looking ( /bowl/testing.php) for might have been removed, had its name changed, or is temporarily unavailable. I checked and the countries are not back....any other ideas? Or am I doing something wrong? thanks! -jc Well, I know this might be late, but, my directions say "/restore.php", and you are putting "/testing.php". Quote Link to comment Share on other sites More sharing options...
Guest cudovich Posted February 6, 2007 Share Posted February 6, 2007 This didn't work for me. When I hit delete and execute I get a 404 error: The page you are looking ( /bowl/testing.php) for might have been removed, had its name changed, or is temporarily unavailable. I checked and the countries are not back....any other ideas? Or am I doing something wrong? thanks! -jc Well, I know this might be late, but, my directions say "/restore.php", and you are putting "/testing.php". Sorry for my delay getting back on this...but its been on the back burner. I followed the directions again, but I get that same error. And it is late, but I am running bowl/restore.php and entering "delete" in the box, clicking "execute" and it come back with this error: The page you are looking ( /bowl/testing.php) for might have been removed, had its name changed, or is temporarily unavailable. (and that is a cut and paste, so it is somehow looking for that testing.php page. Any ideas what's up. If this isn't working, does anyone have the instuctions on how to enter a batch of BOTH the countries and the states back into the mysql database using myphp admin. I am willing to try that...but this page only had directions for the countries....not to add the states. Thanks much! -Cudo Quote Link to comment Share on other sites More sharing options...
Guest SafeTomorrow Posted February 26, 2007 Share Posted February 26, 2007 WHOOPS! Sorry. Can't believe that error got through. Open the restore.php file and search for "testing.php" and change it to "restore.php". sorry. Quote Link to comment Share on other sites More sharing options...
Guest cudovich Posted March 10, 2007 Share Posted March 10, 2007 WHOOPS! Sorry. Can't believe that error got through. Open the restore.php file and search for "testing.php" and change it to "restore.php". sorry. Fantastic.....thanks for clearing that up. It all works now. -jc 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.