1998 Posts in 530 Topics by 433 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » 1-country store / default country and remove country field
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 339 Views |
-
1-country store / default country and remove country field

23 November 2011 at 2:32am
Hello,
I am working on a store, and the products can be shipped to only one country (Norway).
How do I select default Norway value for country field, and at the same time remove country field completely from the checkout / my account page, or even better, display read-only field "country Norway".
And another thing - how do I translate labels "First name" Surname, etc. on check-out page, to Norwegian?
Thank you!
-
Re: 1-country store / default country and remove country field

25 November 2011 at 7:23pm
Hi
In our branch of e-commerce (as seen here www.silverstripe-ecommerce.com), we have the following directive (add to mysite/_config):
EcommerceCountry::EcommerceCountry::set_fixed_country_code("NO");
I would also set:
Geoip::$default_country_code = 'NO';
That seems to work for me, and it turns the country drop-down into a read-only field.
Cheers
Nicolaas
-
Re: 1-country store / default country and remove country field

29 November 2011 at 10:21pm
Thank you for your reply.
I am really having trouble with this one..
Geoip::$default_country_code = "NO";
does nothing, default country is still AfghanistanOrderFormWithoutShippingAddress::set_fixed_country_code("NO");
does nothing, default country is still AfghanistanShoppingCart::set_fixed_country_code("NO");
is giving Fatal error: Call to undefined method ShoppingCart::set_fixed_country_code()EcommerceCountry::EcommerceCountry::set_fixed_country_code("NO");
is giving Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIMEcommerceCountry::set_fixed_country_code("NO");
Fatal error: Class 'EcommerceCountry' not foundHelp? Thank you
| 339 Views | ||
|
Page:
1
|
Go to Top |

