Payment email exception for payed orders

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!
Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 12:43

I found it.
In the execute function you call self::context($tsconf, $pid) before $context->config()->apply($conf).

scheduler_execute.png
scheduler_execute.png (30.09 KiB) Viewed 4620 times

But in self::context($tsconf, $pid) the view is already created with the old config of the context.

create_view.png
create_view.png (32.27 KiB) Viewed 4620 times

Maybe it's enough to swap the two lines or does that affect the rest of the code?
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Payment email exception for payed orders

Post by aimeos » 25 Nov 2022, 13:50

You can't swap the two lines but maybe it's enough to swap $conf and $tsconf variables.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 25 Nov 2022, 13:57

You're right, I've written faster than thinking 😅
You can't swap the two lines but maybe it's enough to swap $conf and $tsconf variables.
I don't know if that works.
Inside the context function you use i18n from $tsconf.
https://github.com/aimeos/aimeos-typo3/ ... se.php#L97
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Payment email exception for payed orders

Post by aimeos » 25 Nov 2022, 14:23

Maybe using apply for both config arrays works better:

Code: Select all

$context->config()->apply($conf)->apply($tsconfig);
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 28 Nov 2022, 09:00

You mean here after creating the $context https://github.com/aimeos/aimeos-typo3/ ... se.php#L79 ?
Because the context() function requires the config as parameter.
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Payment email exception for payed orders

Post by aimeos » 28 Nov 2022, 11:16

Yes, because you can pass the $tsconf variable to the context() method nevertheless.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 28 Nov 2022, 11:20

Then I think that is the possible solution?

apply_config.png
apply_config.png (15.71 KiB) Viewed 4596 times
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Payment email exception for payed orders

Post by aimeos » 28 Nov 2022, 11:22

Yes, if it works?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Moritz
Advanced
Posts: 153
Joined: 07 Nov 2018, 14:05

Re: Payment email exception for payed orders

Post by Moritz » 28 Nov 2022, 11:27

It works!
Should I create a pull request?
Ubuntu 22.04.01
PHP 7.4.30
Typo3 v11.5.21 LTS
Aimeos web shop 22.10.4-pre3

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

Re: Payment email exception for payed orders

Post by aimeos » 28 Nov 2022, 11:32

Yes, please!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply