After installing the WordPress e-Commerce shopping cart Plugin, I had to do some modifications to the cart in order to get it to work the way I wanted. One of those modifications has to do with shipping. I think most people would agree that when your doing small business online, you don’t want to ship to far reaches of the planet. You probably want to keep your customers localized making it easier to do business without too much risk. In the following tutorial, we will cover the process of setting exactly which Countries you want to ship to and remove the ones you don’t. So let’s get started.
If you have already installed the shopping cart plugin, proceed to Section 2.
Grab the latest WP e-Commerce shopping cart plugin and extract the contents to your computer.
Now we need to browse to our wp-shopping-cart folder and open currency_list.php with a text/code editor. Crimson Editor works well.
The currency_list.php file contains a list of all of the selectable Countries you would normally get to choose from. These are inserted into SQL database. We want to limit those to just the Countries we are going to do business with.
Remove each line containing a Country you don’t want to have listed. But be sure to leave the beginning section:
and closing section:
Here is an example of my list, localized for USA, Canada only:
$currency_sql=”INSERT INTO `”.$wpdb->prefix.”currency_list` VALUES (136, ‘USA’, ‘US’, ‘US Dollar’, ‘$’, ‘$’, ‘USD’, ‘1’, ”);
INSERT INTO `”.$wpdb->prefix.”currency_list` VALUES (100, ‘Canada’, ‘CA’, ‘Canadian Dollar’, ‘$’, ‘$’, ‘CAD’, ‘1’, ”);”;
Once you have your list the way you want it, save the currency_list.php and copy it back to your wp-shopping-cart folder. Then upload the folder to your plugins directory and activate the plugin.
If you have already installed the plugin, disable it from the WordPress plugin section.
login to your PhpMyAdmin panel and locate your WordPress database.
Browse to the currency_list table. Example wp_currency_list
Check and delete the Id’s of the Countries you don’t want to have listed.
Go back to your WordPress plugin section, reactivate the plugin and your new Countries should be active.
P.S. If you would like a copy of the currency_list.php that I use for US/Canada only, you can grab it HERE