[ 
https://issues.apache.org/jira/browse/OFBIZ-13269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18023135#comment-18023135
 ] 

Ankit Joshi commented on OFBIZ-13269:
-------------------------------------

Implemented the requirement to introduce ceiling for the Percentage based 
cart-discounts. Extended the Promotion Engine datamodel and the code workflow, 
included the support to configure and validate MaxDiscountAmount if applicable 
while applying the cart based promotions.

Coordinated with [~diveshdutta] and utilized AI Open Cloud Codex tool to 
implement and achieve the requirement.

Scnearios covered:

* Add/Edit UX to configure MaxDiscountAmount when creating the Promo 
conditions/actions

 !AddMaxDiscountAmount.png! 
* Applying the 10 percent discount based on cart-total when the cart-total is 
less than MaxDiscount threshold

 !Cart-Total-Below-Threshold.png! 
* Overriding and applying MaxDiscount amount itself when the percent discount 
based on cart-total exceeds MaxDiscount threshold
 !Cart-Total-Exceeds-Threshold.png! 

Attached resources: 
* Github PR link: 
https://cwiki.apache.org/confluence/display/OFBIZ/Case+Study+of+AI-Driven+Development+for+Jira+Ticket+OFBIZ-13269
 
* Confluence documentation link summarizing the learnings and achievements 
while implementing the business logic using AI tool:
https://cwiki.apache.org/confluence/display/OFBIZ/Case+Study+of+AI-Driven+Development+for+Jira+Ticket+OFBIZ-13269

> Need to have a support for maximum discount cap in Promotions
> -------------------------------------------------------------
>
>                 Key: OFBIZ-13269
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13269
>             Project: OFBiz
>          Issue Type: Task
>          Components: order
>            Reporter: Ankit Joshi
>            Assignee: Ankit Joshi
>            Priority: Minor
>         Attachments: AddMaxDiscountAmount.png, 
> Cart-Total-Below-Threshold.png, Cart-Total-Exceeds-Threshold.png
>
>
> *Scenario:*
> While configuring a Cart Range Percent Discount for promotions, there doesn’t 
> seem to be an out-of-the-box option to set a maximum discount cap. For 
> instance, if the business wants to offer a 15% discount on the cart total, 
> but with a maximum discount limit of $100 irrespective of the cart value, the 
> system currently applies the percentage across the total cart value without a 
> ceiling.
> The primary aim is not to enforce a minimum margin rule for the product price 
> but to set a maximum discount limit regardless of the cart total particularly 
> for the high valued cart totals. 
> The requirement also considers a case whereby system is applying single cart 
> promotion at a time just to simplify the scenario.
> *Solution Proposal:*
> Extending the ProductPromoAction entity with maxDiscountAmount field and 
> considering this configuration in the promotion engine to validate the max 
> discount that can be provided to the customer.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to