Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Problem

We currently send a single discount to the front end as the delivery discount, and we aim to display the service fee discount separately. Essentially, we want to show the original amount, crossed out, and place the word "free" next to it in a prominent highlight.

Solution #1

Add a new field in LaunchDarkly to store the discount value. For instance, if the 'serviceFee' is 300 cents, there will be a corresponding 'serviceFeeDiscount' field with a value of 300 cents, indicating the intention to deduct the entire amount.

Solution #2

If the service fee is calculated as a percentage of the order total, the discount should also be in percentage terms. For example, the value could be 100% to remove the entire fee or 50% to deduct half.

Sequence diagram of solution flow:

https://lucid.app/lucidchart/078ef0e7-5034-4e83-a1ff-a31bb14dda99/edit?view_items=GEf4NsjQf79F7Xvm3RQbRNhB5t4%3D&invitationId=inv_25ece892-d639-4ab5-bc91-65b1c1331107

Note that the proposed changes have sinergy with the refinement to show the service fees in DMP : Feature - Show delivery fees in DMP

image-20240131-231935.pngImage Removedimage-20240131-232034.pngImage Added