Just fixed this with a one-liner:

1. Create a copy of _billing.html.erb and _shipping.html.erb into your
Spree app to override it.
2. Remove the label and textfield in both files and replace with

<%= bill_form.hidden_field :country_id, :value => "152" %>

Value here is hardcoded to id:152 which is Norway. You can find the other
country ids in by searching
the countries.yml file in the Spree code.



On Wednesday, October 3, 2012 2:33:00 AM UTC+2, Ryan Bigg wrote:

I think this would be a useful thing to have within Spree. Please submit
a pull request to fix it.

On Monday, 1 October 2012 at 5:58 PM, Ash Ganatra wrote:

Not sure if this will work for you but I removed all the countries from
my default tax zone (not sure if you used tax on your store)

so when I browse to /admin/zones/1/edit I only have the UK in the list.

Hope this helps!

--
Ash Ganatra
Sent with Sparrow <http://www.sparrowmailapp.com/?sig>

On Monday, 1 October 2012 at 08:53, silver-f wrote:

Thanks ashga.

I manange to remove the country fields for scountry (shipping) and
bcountry (billig country) with Deface.
However, even though my default country is set, I still get

"Country can not be blank" when proceeding with the checkout. (when
country fields are hidden).

How can I set the default country? Any ideas?



On Wednesday, September 19, 2012 10:36:50 AM UTC+2, ashga wrote:

for states I did: -

config.address_requires_state = false

in the config/initializers/spree.rb file not sure if there is a similar
option for countries but I left countries in on mine and removed all except
UK.



On Tuesday, September 18, 2012 2:07:19 PM UTC+1, silver-f wrote:

Hi Spree gurus,

I have a store that will be launched in Norway, and in the first version I
will only
handle 1 payment option "Attached invoice". This means, no payment module
needed for my Spree app.

My question is then;

All my customers are going to be Norwegian, and I would like to disable
the "Country" and "Zones" option and
leave this out from the checkout process. I guess one approach would be to
set default values and hide the input fields.
Is this the way to go? Where should I start?

Thank you very much




--
You received this message because you are subscribed to the Google Groups
"Spree" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/spree-user/-/Ot1SVKXdLxkJ.
To post to this group, send email to spree...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
spree-user+...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/spree-user?hl=en.


--
You received this message because you are subscribed to the Google Groups
"Spree" group.
To post to this group, send email to spree...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
spree-user+...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/spree-user?hl=en.

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/VcPPRL6sPr0J.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedDec 29, '12 at 1:01p
activeDec 29, '12 at 1:01p
posts1
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Silver-f: 1 post

People

Translate

site design / logo © 2022 Grokbase