evalguy Posted April 11, 2007 Posted April 11, 2007 Is it possible to temporarily disable countries so that I can offer shipping only to a few countries for now, then add others individually later? Or do I need to delete them then manually re-enter them later? Thanks.
Jack_mcs Posted April 11, 2007 Posted April 11, 2007 You need to delete them and add them in later or install the Active Countries contribution. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
evalguy Posted April 14, 2007 Author Posted April 14, 2007 Okay thanks. I just did this using phpMyAdmin -- much faster than disabling each individually from the admin UI.
evalguy Posted April 17, 2007 Author Posted April 17, 2007 Re-doing this again, since I had to re-create my store from scratch (different reasons), and looking for opinions on the few options I've come up with... This time, rather than deleting individual countries, I want to keep the countries by make some inactive, and have the following thoughts on how I can do this... (1) I can install the contrib that I found for this, but it involves messing with a lot of files, that I'd rather not do now. (2) I can roll my own, by adding an extra field (say 'country_active') to the 'countries' table as a flag to determine if the country is active or not. Then I'll need to change the SQL select statement(s) in the code to include clause " ... WHERE country_active='Y' ...). This can work since I don't intend to disable countries later -- just at the start and incrementally make them active over time, as I figure out shipping details/costs/etc, so this prevents people from selecting the country and creating an address using this. I can disable/enable countries in the database using phpMyAdmin. (3) I can leave the code alone and make the changes in the database. Specifically, I can rename the 'countries' table to say 'countries_all' and add an active flag field as in (2) above. But here, I would then create a "view" on that table called 'countries' which would be defined by the selection: "... AS SELECT <relevant_fieldnames> FROM countries_all WHERE country_active='Y' ...". I like (3), but anyone have thoughts on if this would work? Only downside I can see here is that in case of an emergency re-creation of the store, I'd need to remember to make this change. I guess I can create a SQL statement now, that would re-create the new table, view, etc for me now and save it as a TO-DO with my backup files. If I did it with code changes only in (2), I would have my local copy of the store files that would get FTP'd to the server in one shot. -Neil.
evalguy Posted April 18, 2007 Author Posted April 18, 2007 Okay, scratch option (3) above, which was my preferred option, and seemed really easy. Apparently my hosting provider is using mySql 4.1.21 which does not have the ability to create views (as v5.0 does). :(
Recommended Posts
Archived
This topic is now archived and is closed to further replies.