DirectDebit Configuration is missing

Questions around the TYPO3 integration and plugins
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!
koellen
Posts: 2
Joined: 11 Jul 2018, 14:29

DirectDebit Configuration is missing

Post by koellen » 11 Jul 2018, 14:37

Hello Aimeos,
I'am about to setup a small installation.
We have added postpay and DirectDebit as payment provider.

Everything is fine except when the user doesn't fill in the details for direct debit.
We get the following messages:
Configuration for "directdebit.accountno" is missing
Configuration for "directdebit.bankcode" is missing
Configuration for "directdebit.bankname" is missing

I asume this should say: "Please enter your account number" etc.
But I can't figure out where to configure these messages.

Aimeos Version: 17.10.1
Typo3: 8.7.16

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: DirectDebit Configuration is missing

Post by aimeos » 14 Jul 2018, 12:55

That's a bit more complicated than it should be. The error messages are generated here:
https://github.com/aimeos/aimeos-core/b ... e.php#L318

And they are displayed in the template of the checkout process in the HTML client:
https://github.com/aimeos/ai-client-htm ... lt.php#L81

What you can do now is to copy the body-defaultphp template to your own Aimeos extension so you can modify it and change

Code: Select all

<li class="error-item"><?= $enc->html( $errmsg ); ?></li>
to

Code: Select all

<li class="error-item"><?= $enc->html( $this->translated( 'error', $errmsg ) ); ?></li>
Then, you can translate the complete error message using TypoScript with

Code: Select all

plugin.tx_aimeos.settings.i18n.en.0 {
  domain = error
  string = Configuration for "directdebit.accountno" is missing
  trans = Please enter your account number
}
More about overwriting translations in TYPO3 is written here: https://aimeos.org/docs/TYPO3/Overwrite_translations
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

koellen
Posts: 2
Joined: 11 Jul 2018, 14:29

Re: DirectDebit Configuration is missing

Post by koellen » 17 Jul 2018, 08:23

Thanks for the hints.

I copied the file into my extension but had to alter the line to:

Code: Select all

<li class="error-item"><?= $enc->html( $this->translate( 'client', $errmsg ) ); ?></li>
for the domain "error" is not known in 2017.10.

Then you can translate it with TypoScript:

Code: Select all

plugin.tx_aimeos.settings.i18n.en.0 {
  domain = client
  string = Configuration for "directdebit.accountno" is missing
  trans = Please enter your account number
}

Post Reply