Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing admin to show all countries regardless checkout zone #2588

Merged
merged 1 commit into from
Feb 26, 2018

Conversation

softr8
Copy link
Contributor

@softr8 softr8 commented Feb 20, 2018

Fixes #2562

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Makes much sense!

Could we use a named parameter to increase the readability?

@@ -106,8 +106,8 @@ def taxons_tree(root_taxon, current_taxon, max_level = 1)
end
end

def available_countries
checkout_zone = Zone.find_by(name: Spree::Config[:checkout_zone])
def available_countries(zone_name = Spree::Config[:checkout_zone])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have a more meaningful parameter here. Just passing nil to restrict the countries to a specific zone seams unintuitive to me.

Maybe something like?

def available_countries(restrict_to_zone: Spree::Config[:checkout_zone])

@softr8 softr8 force-pushed the replace-backend-checkout-zone branch from 2f8efc8 to 27eec5b Compare February 20, 2018 20:29
@softr8 softr8 force-pushed the replace-backend-checkout-zone branch from 27eec5b to 9d6722c Compare February 20, 2018 20:31
@softr8
Copy link
Contributor Author

softr8 commented Feb 20, 2018

Done! let me know if it still makes sense.

Thanks!

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jhawthorn jhawthorn merged commit 177770f into solidusio:master Feb 26, 2018
@jhawthorn
Copy link
Contributor

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants