FAQ
Is there a helper method in Spree 1.3 or 2.0 we can use to filter the
available countries in the country dropdown to only be the one's we have
setup shipping methods for? Currently we only ship to US and Canada and
would like to display only those countries in the dropdown box. We could
hard code them in, but I would like something dynamic that would
automatically add countries in the future as we setup shipping methods for
them.

Regards,

Nate

Search Discussions

  • Washington Luiz at Jul 17, 2013 at 1:31 pm
    Hey Nate I think hard code it works just fine. Considering stores don't
    change countries they ship too often, I would guess most never change at
    all.

    Or you could remove all countries you don't support from db. I'd go with
    the first option though.

    On Wed, Jul 17, 2013 at 8:59 AM, Nate Lowrie wrote:

    Is there a helper method in Spree 1.3 or 2.0 we can use to filter the
    available countries in the country dropdown to only be the one's we have
    setup shipping methods for? Currently we only ship to US and Canada and
    would like to display only those countries in the dropdown box. We could
    hard code them in, but I would like something dynamic that would
    automatically add countries in the future as we setup shipping methods for
    them.

    Regards,

    Nate


    --
    Washington L Braga Jr
    Developer
    Spree Commerce, Inc.
  • Ryan Bigg at Jul 18, 2013 at 5:27 am
    Nate, just remove them from the spree_countries table if you don't need
    them. You can add/remove countries through the admin backend too.

    On Wed, Jul 17, 2013 at 11:31 PM, Washington Luiz wrote:

    Hey Nate I think hard code it works just fine. Considering stores don't
    change countries they ship too often, I would guess most never change at
    all.

    Or you could remove all countries you don't support from db. I'd go with
    the first option though.

    On Wed, Jul 17, 2013 at 8:59 AM, Nate Lowrie wrote:

    Is there a helper method in Spree 1.3 or 2.0 we can use to filter the
    available countries in the country dropdown to only be the one's we have
    setup shipping methods for? Currently we only ship to US and Canada and
    would like to display only those countries in the dropdown box. We could
    hard code them in, but I would like something dynamic that would
    automatically add countries in the future as we setup shipping methods for
    them.

    Regards,

    Nate


    --
    Washington L Braga Jr
    Developer
    Spree Commerce, Inc.


    --

    Ryan Bigg
    Community Manager
    Spree Commerce, Inc.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJul 17, '13 at 11:59a
activeJul 18, '13 at 5:27a
posts3
users3
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase