Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#8151 by Harpal Singh
10 Jun 2019, 11:34
aimeos wrote:The field is unknown to the rest of the Aimeos code so this won't work if you don't adapt all code that should use the value from this field.

An easier solution would be to write a service provider decorator that adds the setup costs to the basket during checkout in either the delivery or payment selection step (if it's the only delivery option, the costs will be added immediately when adding a product by the Autofill basket plugin). You can add the costs not only as shipping or payment costs but also as delivery/payment related "product" line if you add the setup costs as delivery/payment price value instead of price costs.


Can you please give some idea about How to write a service provider decorator and how to use it with payment gateway?
Thanks
Harpal Singh
#8181 by Harpal Singh
12 Jun 2019, 10:06
Can I use Costs decorator outside from vendors in my extension folder of project.
I want to override the /vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator.Costs.php class.
or Can I override the PaypalExpress Class?
If possible then how and where I can find/create clone of these classes.

Thanks
Harpal Singh
#8183 by Harpal Singh
12 Jun 2019, 11:45
Harpal Singh wrote:Can I use Costs decorator outside from vendors in my extension folder of project.
I want to override the /vendor/aimeos/aimeos-core/lib/mshoplib/src/MShop/Service/Provider/Decorator.Costs.php class.
or Can I override the PaypalExpress Class?
If possible then how and where I can find/create clone of these classes.

Thanks
Harpal Singh


I have created PayPalExpress Provider in my ext but it shows both the providers while in admin.
What I want is to override some functions of PayPalExpress(in my extension) class.

Thanks
Harpal Singh