How to do redirect in decorator

Help for integrating the Laravel package
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!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

How to do redirect in decorator

Post by krzysiekp » 19 Nov 2021, 12:05

I try redirect to some page in my decorator but not working. How to do this ?

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

Re: How to do redirect in decorator

Post by aimeos » 21 Nov 2021, 14:37

Redirecting is not possible in a HTML client component because it generates only a part of the result page.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: How to do redirect in decorator

Post by krzysiekp » 22 Nov 2021, 07:38

So how to redirect to another page ? I validate the data in the decorator in "process" method and how to redirect if something is wrong ?

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

Re: How to do redirect in decorator

Post by aimeos » 22 Nov 2021, 09:22

There's no standard way that works.
You should show the error message instead and the basket contains a "Back" button the user can click.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply