Welcome to the Umbraco community and Tea Commerce! Happy to have you.
Having an external discount is not a common case that is documented or written about. What you would do is add the discount code using the AddDiscountCode using the API.
Then make a custom marketing rule that uses this discount code to check if the rule applies. Then you would need to make a custom award as well that uses the data about discount rate from the external system. You would property make a cache of the data from the external system so it wont slow down the order calculation (which takes care of discount, and is run everytime an order changes something).
Discount based on member group would need a custom marketing rule again to check the member.
Sample Code or "mods"?
New to Umbraco (and Tea Commerce), I am wondering if there is a place that has sample code or walkthrough on how to implement things like
Validating a coupon code from an external system and applying the externally defined Discount (either percentage or value)
Discounting based on Member group (or type)
Merging stores from multiple vendors into a master store
etc.
I can write the code, the challenge I am having is quite here to start :-)
Hi John
Welcome to the Umbraco community and Tea Commerce! Happy to have you.
Having an external discount is not a common case that is documented or written about. What you would do is add the discount code using the AddDiscountCode using the API.
Then make a custom marketing rule that uses this discount code to check if the rule applies. Then you would need to make a custom award as well that uses the data about discount rate from the external system. You would property make a cache of the data from the external system so it wont slow down the order calculation (which takes care of discount, and is run everytime an order changes something).
Discount based on member group would need a custom marketing rule again to check the member.
You can see the rules and awards here.
https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/tree/master/Source/TeaCommerce.Umbraco.Application/Marketing
Kind regards
Anders
is working on a reply...