Extend Base Classes in Typo3
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Extend Base Classes in Typo3
in a self developed Extension i use allready a field language but its a integerfield (cause typo3 handles the languages bi integers)
So i Edit Mshop/Common/Item/Base.php and add in the Function checkLanguageId this:
two questions here:
how can i extend this class and that method so that i dont have to write that in the aimoes extension folder (i will lose it on next update). I have allerady add it to my Extension in src/MShop/Common/Item/base.php
But i must say Typo3 go run this Class there and if you not find a specialy Method run the parent-class
Question 2: Can we configure the language so that this code is not needed?
if i dont do that the message :"invalid ISO language..." appears the whole time
So i Edit Mshop/Common/Item/Base.php and add in the Function checkLanguageId this:
Code: Select all
switch($lang){
case 0:
$langid = 'de'
break;
case 2:
$langid = 'fr'
... etc
}
how can i extend this class and that method so that i dont have to write that in the aimoes extension folder (i will lose it on next update). I have allerady add it to my Extension in src/MShop/Common/Item/base.php
But i must say Typo3 go run this Class there and if you not find a specialy Method run the parent-class
Question 2: Can we configure the language so that this code is not needed?
if i dont do that the message :"invalid ISO language..." appears the whole time
Re: Extend Base Classes in Typo3
Don't try this that way, it will only lead to numerous problems! In TYPO3 you have to map the sys_language_id to the ISO language code nevertheless to get the product texts in the language of the page. Use TypoScript code like this for the mapping:
Code: Select all
config.language = en
config.sys_language_uid = 0
[globalVar = GP:L = 1]
config.language = de
config.sys_language_uid = 1
plugin.tx_aimeos.settings.client.html.common.format.seperatorDecimal = ,
plugin.tx_aimeos.settings.client.html.common.format.seperator1000 = .
[global]
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
Re: Extend Base Classes in Typo3
i do this
but it dosen't change anything.
Output by the clientmodule: Fehler Invalid ISO language code "0"
Code: Select all
config.language = de
config.sys_language_uid = 0
[globalVar = GP:L = 1]
config.language = fr
config.sys_language_uid = 1
[global]
[globalVar = GP:L = 2]
config.language = it
config.sys_language_uid = 2
[global]
Output by the clientmodule: Fehler Invalid ISO language code "0"
Re: Extend Base Classes in Typo3
Strange. This works perfectly in all other installations. Here's the code that checks for "config.language":
https://github.com/aimeos/aimeos-typo3/ ... le.php#L52
https://github.com/aimeos/aimeos-typo3/ ... le.php#L52
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
Re: Extend Base Classes in Typo3
And what can i do now?
Re: Extend Base Classes in Typo3
What's the URL that leads to that error?
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
Re: Extend Base Classes in Typo3
This happen when i am in the backend and klick on the client module.aimeos wrote:What's the URL that leads to that error?
The shop is in an intranet. not acesible without login
Re: Extend Base Classes in Typo3
If you get this error in the backend, you've overwritten some code in Aimeos or pass the TYPO3 language IDs somewhere directly into the Aimeos classes. Please remove your code or create a clean installation, then the error will be gone.
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
Re: Extend Base Classes in Typo3
I disabled my extension but its still the same.
my users have an field "languages" but its an int.
In your Extension there must be an string
my users have an field "languages" but its an int.
In your Extension there must be an string
Re: Extend Base Classes in Typo3
Please debug here to see if there's the TYPO3 integer value is passed:
https://github.com/aimeos/aimeos-typo3/ ... le.php#L52
https://github.com/aimeos/aimeos-typo3/ ... le.php#L52
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