SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2
Topic Silvercart initially creates an US-Store? 6410 Views

Silvercart initially creates an US-Store?

7 March 2012 at 8:32pm

Hi all,

I installed Silvercart to an existing Silverstripe installation, with i18n::set_locale('de_DE'); set in /mysite/_config.php.
After /dev/build?flush=all Silvercart installation runs fine, but in the backend the default language is set to English(US) (dropdown field above SiteTree)?

In the template it shows 'xml:lang="en-US" lang="en-US"', but also 'http-equiv="Content-language" content="de_DE" />' (from the Silverstripe-function '$MetaTags(false)'), that does not really go well together.
What can I do, to tell Silvercart to 'install a German store'?

Thanks, Tobi

Re: Silvercart initially creates an US-Store?

8 March 2012 at 8:31am

Hello Tobi,
you must also add the following line to your _config.php:

Translatable::set_default_locale("de_DE");


SilverCarts' site tree is already build now and the pages are all "en_US". If there are no important entries in you database I suggest that you delete all tables and dev/build again.

Re: Silvercart initially creates an US-Store?

9 March 2012 at 12:59pm

Hi Roland,

thanks - that did the trick - I see, you added this to the documentation now.

I have another problem now. When I add the testdata and click on a productcategory in the Frontpage I get:

Call to undefined method Page_Controller::breadcrumbs() in /www/vhosts/***/httpdocs/silvercart/code/pages/SilvercartProductGroupPage.php on line 939


e.g. /home/warengruppen/zahlungsmodule/
This error does not occur, when /home/warengruppen/ is accessed or /home/warengruppen/zahlungsmodule/1/PayPal.

Tobi

Re: Silvercart initially creates an US-Store?

9 March 2012 at 1:46pm

hi tobi,
does you class Page_Controller extend SilvercartPage_Controller?

Re: Silvercart initially creates an US-Store?

9 March 2012 at 1:57pm

Hi Roland,

yes it does:

class Page_Controller extends SilvercartPage_Controller {

Tobi

Re: Silvercart initially creates an US-Store?

9 March 2012 at 3:45pm

Your feedback already improved the docu ;)
I tried to reproduce the error by making a de_DE installation but I did not succeed. Did the same bug occur when your installation was still en_US?
I am confused a little bit by your error message because it refers to line 939 on SilvercartProductGroupPage.php. I have only curly braces around that line. Did you make any changes to the code? Did you implement a function breadcrumbs() on Page.php?

Re: Silvercart initially creates an US-Store?

9 March 2012 at 4:45pm

Hi Roland,

no, I did not implement any changes to the code. I used the files from the custom download page.

Line 939 here is:

return parent::Breadcrumbs($maxDepth, $unlinked, $stopAtPageType, $showHidden);

I will do an install without adding de_DE to the config-file and keep you up-to-date.

Tobi

Re: Silvercart initially creates an US-Store?

9 March 2012 at 10:54pm

Back from installing Silvercart without Translatable-settings in _config.php.

Same here: after adding testdata to the store, the error occurs when clicking on one productgroup in the mainnavigation.

I did the install with the silvercart-full-package-with-silverstripe.
Server: Apache with mod_php - all standard-silverstripe-requirements are passed.

Tobi