locale languageid and currencyid NULL
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 44
- Joined: 05 Feb 2018, 09:57
locale languageid and currencyid NULL
Hi. Any idea why values of $this->getContext()->getLocale() has languageid and currencyid NULL while bdata contains this data? I am attaching also local DB tables data.
- Attachments
-
- Snip20180707_16.png (94.33 KiB) Viewed 2400 times
-
- Snip20180707_15.png (97.08 KiB) Viewed 2400 times
-
- Snip20180707_21.png (146.69 KiB) Viewed 2400 times
-
- Posts: 44
- Joined: 05 Feb 2018, 09:57
Re: locale languageid and currencyid NULL
the rest...
- Attachments
-
- Snip20180707_20.png (116.1 KiB) Viewed 2399 times
-
- Snip20180707_19.png (97.57 KiB) Viewed 2399 times
Re: locale languageid and currencyid NULL
Depends on the environment. If you are in a job controller that is executed via CLI, language and currency are NULL because you have to loop over the available sites and set the locale depending on the current site (at least most of the time).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 44
- Joined: 05 Feb 2018, 09:57
Re: locale languageid and currencyid NULL
Yes, it's in controller called via CLI (product import -> Text processor).
How do these lines work then?
will this ever be populated if it's NULL?
How do these lines work then?
Code: Select all
if( !isset( $list['text.languageid'] ) ) {
$list['text.languageid'] = $this->getContext()->getLocale()->getLanguageId();
}
Re: locale languageid and currencyid NULL
Well, they doesn't work at all. Somebody wanted to do something good but it doesn't work as expected like you mentioned. We will remove that lines and you have to add the languageid to a column of your import file.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star