Customize delivery and payment providers
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!
-
- Posts: 4
- Joined: 28 Nov 2022, 14:29
Customize delivery and payment providers
OS: Ubuntu 20.04 LTS
PHP: 7.4
Laravel: 8.83
Aimeos-laravel: 2021.10.6
Hello. I have a shop for local and world wide market. I want to make some customizations in delivery and payment providers.
So if you are from local market (Armenia) you can choose pay via cash after delivery, or if you are from another country, you will not be able to choose that.
Or another case:
If you are from Armenia, but selected devlivery is Fedex, you will not able to post pay via cash, because fedex shipper will not get that money
So where can I put these rules between delivery and payment providers?
PHP: 7.4
Laravel: 8.83
Aimeos-laravel: 2021.10.6
Hello. I have a shop for local and world wide market. I want to make some customizations in delivery and payment providers.
So if you are from local market (Armenia) you can choose pay via cash after delivery, or if you are from another country, you will not be able to choose that.
Or another case:
If you are from Armenia, but selected devlivery is Fedex, you will not able to post pay via cash, because fedex shipper will not get that money
So where can I put these rules between delivery and payment providers?
Re: Customize delivery and payment providers
Use the "Country" service decorator to limit delivery options by the country the customer selected in the address tab:
https://aimeos.org/docs/latest/manual/s ... s/#country
https://aimeos.org/docs/latest/manual/s ... ors/#usage
To hide the "Cash on delivery" payment option if "Fedex" has been chosen, you need to implement your own decorator that does the check:
https://aimeos.org/docs/latest/provider ... ecorators/
https://aimeos.org/docs/latest/manual/s ... s/#country
https://aimeos.org/docs/latest/manual/s ... ors/#usage
To hide the "Cash on delivery" payment option if "Fedex" has been chosen, you need to implement your own decorator that does the check:
https://aimeos.org/docs/latest/provider ... ecorators/
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
-
- Posts: 4
- Joined: 28 Nov 2022, 14:29
Re: Customize delivery and payment providers
Excellent, thanks
-
- Posts: 4
- Joined: 28 Nov 2022, 14:29
Re: Customize delivery and payment providers
Hello. I couldn't find a way and place to make. Would you provide me more info?
I created an extended and empty decorator class, but even couldn't find it in admin panel when editing a service.
Maybe I need to add that class name some where? Or clear some cache after class creation?
I need to "enable" it so I could start to develop and debug my code. Because as I understand it's not so ease to make what I want
I created an extended and empty decorator class, but even couldn't find it in admin panel when editing a service.
Maybe I need to add that class name some where? Or clear some cache after class creation?
I need to "enable" it so I could start to develop and debug my code. Because as I understand it's not so ease to make what I want
Re: Customize delivery and payment providers
Service decorators are found automatically if they are placed in the right location, e.g. in your own Aimeos extension in:
No caching or other activation needed. Also check that your decorator uses the correct PHP namespace.
Code: Select all
./packages/<myext>/src/MShop/Service/Provider/Decorator/
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