-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Customer account & order] Change order totals to account for refunds #2179
Conversation
sections/main-order.liquid
Outdated
colspan="2" | ||
data-label="{{ 'customer.order.total_refunded' | t }}" | ||
> | ||
{{ order.total_refunded_amount | money_with_currency }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How certain is the math here? Like are we 100% sure that total_net_amount
- total_refunded_amount
= total_price
?
If you haven't spoken from someone on the Orders team, we should pull someone in for 👀. Refunds can get really edge-case-y.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill double check but from what I'm seeing, some theme partners are using order.total_net_amount
as well 👍 (Maestrooo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if the math worked well when you partially refund shipping on top of that and it worked well but the only thing is that we don't display the subsequent refunds. Unsure if it's relevant to buyers to be aware if there was multiple attempt to refund partially an order. 🤔
- This is my test order
#1041
admin - This is the storefront account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like maybe it's added noise, I'm not sure how useful it is to be displaying each refund individually 🤔 Plus if we do that then it means we will also need a total which will add even more info/content to the order.
On the order object, there are the transactions information available but it doesn't contain much info. We can check if a transaction is a refund
and output its amount, but again not sure how useful. Here is how it could look:
Here is the information available for transactions:
I think if we could have had more details about what was refunded in that transaction it'd be more useful but right now it doesn't seem to add much. The total refund amount seem enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The total refund amount seem enough
Aligned for now! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the maths and all, might be worth investigating how we communicate/implement these on the email confirmation that is sent. That might be an additional place to validate were good or not. 🙌
Everything looks good to me! 👍
The only minor thing I could think of was maybe we should confirm it with UX folks? |
I am good with the term "Refunded" it aligns with how we communicate this information in the admin to merchants. This language is clear and have the same meaning for buyers. 👌 In this case we have both; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Ludo for putting this together. 🎉
The only observation I have is how we can better communicate the Refunded
or Partially refunded
amount. Displaying a negative sign in front of the value will help do the math for customers. It would help bring more clarity as they read the table from the right only. It would follow the admin presentation as well.
sections/main-order.liquid
Outdated
colspan="2" | ||
data-label="{{ 'customer.order.total_refunded' | t }}" | ||
> | ||
{{ order.total_refunded_amount | money_with_currency }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if the math worked well when you partially refund shipping on top of that and it worked well but the only thing is that we don't display the subsequent refunds. Unsure if it's relevant to buyers to be aware if there was multiple attempt to refund partially an order. 🤔
- This is my test order
#1041
admin - This is the storefront account
@@ -80,7 +80,7 @@ | |||
{{ order.fulfillment_status_label }} | |||
</td> | |||
<td headers="RowOrder ColumnTotal" role="cell" data-label="{{ 'customer.orders.total' | t }}"> | |||
{{ order.total_price | money_with_currency }} | |||
{{ order.total_net_amount | money_with_currency }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know what you think is best @melissaperreault:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside the currency symbol - to validate if this would be different for other languages but it's best like that and aligns with the admin too 🙌 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested a full refund and a partial refund scenario. The placement and the clarity is good to me with the added negative sign in front. It really helps!
I cannot speak if this is the right implementation code to account for translations with the negative sign, but otherwise from Theme design UX layout, this improvement is good! Thanks Ludo! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking good, Ludo!
The current implementation of negative sign looks fine too, I don't see any disadvantage of the way it added.
8d7706e
I created a separate branch to explore the changes it would mean to match the email notification a bit more and created a PR with the changes: #2264 |
PR Summary:
In our customer pages, the total for orders never reflects refunds. So it creates a poor experience for the merchant's clients seeking confirmation that their order was in fact refunded.
Why are these changes introduced?
Fixes #2154
What approach did you take?
I switched our use of
order.total_price
toorder.total_net_amount
. In our docs, you can see the difference withorder.total_price
.When I compare now the order from the admin and the customer account page, it reflects properly the information:
Screenshot of the main-account page
Screenshot of the main-order page
Other considerations
Gotta make sure we're not showing totals that are off. But based on the information from the admin it looks right.
Decision log
Visual impact on existing themes
It will change the totals on customer order pages and account summary.
It also adds a
Refunded
row when there has been a refund.Testing steps/scenarios
Demo links
Checklist