Order of Service\Provider\Decorator ?
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Order of Service\Provider\Decorator ?
Hi Aimeos, hi everybody. Little question, but important for me. I have created two decorators for shipping. One of them calculates price based on country and second based on order total sum. For me it is important that country decorator must be executed first and then result of second decorator will be added to first. So what is the order of execution of decorators. In admin panel I set like shiping class: Standard, FirstDecorator,SecondDecorator. But seems it doesn't affect how I set decorators
Re: Order of Service\Provider\Decorator ?
Use "Standard,SecondDecorator,FirstDecorator", i.e. "Standard,Sum,Country". The decorators are stacked up from left to right and executed from right to left (think of decorators like the laysers of an onion).
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