Skip to content
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

Add 'Voucher:' before voucher code on order confirmation emails #12998

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kernal053
Copy link
Contributor

@kernal053 kernal053 commented Nov 26, 2024

What? Why?

What should we test?

  • When voucher is used in an order as a shopper, order confirmation email will contain "Voucher:" text before voucher code.
  • Check also for translated "Voucher" text.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

Preview (en)

Screenshot 2024-11-26 at 2 36 46 PM

Preview (es)

Screenshot 2024-11-26 at 2 37 41 PM

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you.

I have a suggestion below. Are you up for that?

Comment on lines +46 to 48
- if adjustment.originator_type == "Voucher"
= "#{t(:voucher)}:"
= "#{adjustment.label}:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest to use a translation here? Then we can customise the display for each language. Other possibilities could be:

  • Voucher CODE:
  • CODE (voucher):
  • CODE (discount):

You can pass the voucher code to the translation:

Suggested change
- if adjustment.originator_type == "Voucher"
= "#{t(:voucher)}:"
= "#{adjustment.label}:"
- if adjustment.originator_type == "Voucher"
= t(".voucher_label", code: adjustment.label)

And in en.yml I would add "Voucher %{code}:" as translation, avoiding the weird double colon in the line.

@mkllnk mkllnk added the user facing changes Thes pull requests affect the user experience label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user facing changes Thes pull requests affect the user experience
Projects
Status: In Progress ⚙
Development

Successfully merging this pull request may close these issues.

Add "voucher:" before voucher code on order confirmation emails
2 participants