Discount rule by supplier
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!
- AleksandarJovanovic
- Posts: 26
- Joined: 01 Jun 2022, 21:26
Discount rule by supplier
laravel version 9.36.4 , Aimeos version 2022.10.3 and PHP version 8.1.3
Hello, can i set discount rule by suppliers or other atribute. I just see discount by category and that works great.
Best regard
Alex
Hello, can i set discount rule by suppliers or other atribute. I just see discount by category and that works great.
Best regard
Alex
Re: Discount rule by supplier
Sure, you can
Create a new catalog rule decorator checking for suppliers attached to products similar to the category rule decorator:
- https://github.com/aimeos/aimeos-core/b ... tegory.php
- https://aimeos.org/docs/latest/providers/rules/
Make sure, you add "supplier" to the fetched product domains so the supplier items are attached to the products in your rule decorator, e.g. in:
https://aimeos.org/docs/2022.x/config/c ... e/#domains
Search for "configuration client/html/catalog domains" in the docs.
Create a new catalog rule decorator checking for suppliers attached to products similar to the category rule decorator:
- https://github.com/aimeos/aimeos-core/b ... tegory.php
- https://aimeos.org/docs/latest/providers/rules/
Make sure, you add "supplier" to the fetched product domains so the supplier items are attached to the products in your rule decorator, e.g. in:
https://aimeos.org/docs/2022.x/config/c ... e/#domains
Search for "configuration client/html/catalog domains" in the docs.
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