Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Checkout: Hide Country/Zone option for customers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
silver-f  
View profile  
 More options Sep 18 2012, 9:07 am
From: silver-f <ole.kjo...@gmail.com>
Date: Tue, 18 Sep 2012 06:07:19 -0700 (PDT)
Local: Tues, Sep 18 2012 9:07 am
Subject: Checkout: Hide Country/Zone option for customers

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ashga  
View profile  
 More options Sep 19 2012, 4:36 am
From: ashga <a...@appnotiq.com>
Date: Wed, 19 Sep 2012 01:36:50 -0700 (PDT)
Local: Wed, Sep 19 2012 4:36 am
Subject: Re: Checkout: Hide Country/Zone option for customers

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
silver-f  
View profile  
 More options Oct 1 2012, 3:53 am
From: silver-f <ole.kjo...@gmail.com>
Date: Mon, 1 Oct 2012 00:53:31 -0700 (PDT)
Local: Mon, Oct 1 2012 3:53 am
Subject: Re: Checkout: Hide Country/Zone option for customers

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ash Ganatra  
View profile  
 More options Oct 1 2012, 3:58 am
From: Ash Ganatra <a...@appnotiq.com>
Date: Mon, 1 Oct 2012 08:58:08 +0100
Local: Mon, Oct 1 2012 3:58 am
Subject: Re: [spree-user] Re: Checkout: Hide Country/Zone option for customers

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)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Bigg  
View profile  
 More options Oct 2 2012, 8:33 pm
From: Ryan Bigg <r...@spreecommerce.com>
Date: Wed, 3 Oct 2012 10:32:52 +1000
Local: Tues, Oct 2 2012 8:32 pm
Subject: Re: [spree-user] Re: Checkout: Hide Country/Zone option for customers

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
silver-f  
View profile  
 More options Dec 29 2012, 8:01 am
From: silver-f <ole.kjo...@gmail.com>
Date: Sat, 29 Dec 2012 05:01:33 -0800 (PST)
Local: Sat, Dec 29 2012 8:01 am
Subject: Re: [spree-user] Re: Checkout: Hide Country/Zone option for customers

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »