WordPress.org

Forums

WP eCommerce
[resolved] Move USA to top of Country list (6 posts)

  1. saiyajinss
    Member
    Posted 11 months ago #

    Is there a way to move USA to the top of the country drop down list? 99.9% of my customers are in the USA and a few have complained about having to scroll through all those other countries. I have removed a few but I want to allow most countries to purchase from my store.

    https://wordpress.org/plugins/wp-e-commerce/

  2. saiyajinss
    Member
    Posted 10 months ago #

    So it seems that the list is generated when the plugin is installed and resides in the data base. Does anyone know how to change this?

  3. Jeff Pye Brook
    Member
    Posted 10 months ago #

    You are probably going to have to modify the code. The WPSC_Countries class has a private function '_compare_countries_by_name' that does a text string comparison. You might want to change that function to always show US as the first country.

  4. saiyajinss
    Member
    Posted 7 months ago #

    I tried a few things without any luck. Does anyone else have any suggestions? Maybe as part of a future upgrade from the developers?

  5. saiyajinss
    Member
    Posted 7 months ago #

    I just noticed after the last update all of the countries are now in a random order making it vary hard to find anything in the list. I really do not want to remove too many countries since we get international orders. Any help would be appreciated.

  6. Justin Sainton
    Member
    Plugin Author

    Posted 7 months ago #

    Hi saiyajinss,

    I would try flushing your transients if at all possible.

    The next version of WP eCommerce will have filters on the WPSC_Countries::get_countries() and WPSC_Countries::get_countries_array() functions. They will be named wpsc_get_countries and wpsc_get_countries_array, respectively.

    If you want to add those now, you'll be in great shape to use them to sort countries however you see fit.

Reply

You must log in to post.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic