Decorator for Checkout Confirm
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!
Decorator for Checkout Confirm
Hi,
I would like to add a Decorator on the confirmation page of the checkout. I wrote a rather simple Decorator class named ConfirmDecorator which just has an addData method and sets a variable for the view, e.g.
$view->mytest = array('test' => 'test');
Then, I configured it according to https://aimeos.org/docs/latest/config/c ... t-confirm/
plugin.tx_aimeos.settings.client.html.checkout.confirm.standard.decorators.global {
0 = ConfirmDecorator
}
However, when I access $this->mytest on the confirm page, it's empty.
What's missing to make this work?
Claudia
I would like to add a Decorator on the confirmation page of the checkout. I wrote a rather simple Decorator class named ConfirmDecorator which just has an addData method and sets a variable for the view, e.g.
$view->mytest = array('test' => 'test');
Then, I configured it according to https://aimeos.org/docs/latest/config/c ... t-confirm/
plugin.tx_aimeos.settings.client.html.checkout.confirm.standard.decorators.global {
0 = ConfirmDecorator
}
However, when I access $this->mytest on the confirm page, it's empty.
What's missing to make this work?
Claudia
Re: Decorator for Checkout Confirm
Hi,
it´s
plugin.tx_aimeos.settings.client.html.checkout.confirm.decorators.global {
0 = ConfirmDecorator
}
Best
Robert
it´s
plugin.tx_aimeos.settings.client.html.checkout.confirm.decorators.global {
0 = ConfirmDecorator
}
Best
Robert
Re: Decorator for Checkout Confirm
Hi Robert,
thanks for your response, but it doesn't work with your suggestion for the configuration, either.
I cleared the cache of TYPO3, so this shouldn't be the cause.
Claudia
thanks for your response, but it doesn't work with your suggestion for the configuration, either.
I cleared the cache of TYPO3, so this shouldn't be the cause.
Claudia
Re: Decorator for Checkout Confirm
Hm,
did you do a composer dumpautoload before clearing caches? Or the similar from the Install Tool if you are on TER.
You could provoke a syntax error like removing a semicolon from a line to check if the class actually gets loaded.
If that dosen´t help a look into your class and directory structure could help to find the cause of the error.
Robert.
did you do a composer dumpautoload before clearing caches? Or the similar from the Install Tool if you are on TER.
You could provoke a syntax error like removing a semicolon from a line to check if the class actually gets loaded.
If that dosen´t help a look into your class and directory structure could help to find the cause of the error.
Robert.
Re: Decorator for Checkout Confirm
Hi Robert,
the Decorator classes are not in the autoload files. I created other Decorators before and they aren't either.
The other Decorator classes work fine. I put the new one into the same directory.
There is already an intended typo in the class. This doesn't break anything, though, so the class is not used.
Claudia
the Decorator classes are not in the autoload files. I created other Decorators before and they aren't either.
The other Decorator classes work fine. I put the new one into the same directory.
There is already an intended typo in the class. This doesn't break anything, though, so the class is not used.
Claudia
Re: Decorator for Checkout Confirm
Try accesing the variable with $this->get('mytest');
And check if you are in a partial and have to pass the variable from the parent template.
And check if you are in a partial and have to pass the variable from the parent template.
Re: Decorator for Checkout Confirm
The Decorator class is not loaded at all, otherwise I would get a syntax error response, because I added the syntax error in there.
The variable which I set is actually the same one as I set in the checkout Decorator.
The variable which I set is actually the same one as I set in the checkout Decorator.
Re: Decorator for Checkout Confirm
@Claudia: Which Aimeos version do you use and where did you store the class 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
Re: Decorator for Checkout Confirm
Hi,
I had a fresh look today and finally found the solution:
plugin.tx_aimeos.settings.client.html.checkout.standard.decorators.global {
0 = ConfirmDecorator
}
Claudia
I had a fresh look today and finally found the solution:
plugin.tx_aimeos.settings.client.html.checkout.standard.decorators.global {
0 = ConfirmDecorator
}
Claudia