Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Display the gift card's initial value #288

Merged
merged 2 commits into from
Sep 20, 2017

Conversation

maximevaillancourt
Copy link
Contributor

@maximevaillancourt maximevaillancourt commented Sep 18, 2017

What are you trying to accomplish with this PR?

Always display the gift card's initial value, which currently never shows up. The only value that appears is the card's balance, and that only appears when when it's not equal to the card's initial value. This should fix a comment posted on issue #279. (fix #279)

Checklist

  • I have 🎩'd these changes.

Copy link
Contributor

@t-kelly t-kelly left a comment

Choose a reason for hiding this comment

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

Nice 👍


{% if gift_card.balance != gift_card.initial_value %}
<p>{{ 'gift_cards.issued.remaining_html' | t: balance: gift_card.balance | money }}</p>
<p>Current balance: {{ 'gift_cards.issued.remaining_html' | t: balance: gift_card.balance | money }}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this should be included in a locale, not hard-coded.

<h2>{{ formatted_initial_value }}</h2>
{% assign formatted_initial_value = gift_card.initial_value | money_without_trailing_zeros: gift_card.currency %}

<h2>Gift card value: {{ formatted_initial_value }}</h2>
Copy link
Contributor

Choose a reason for hiding this comment

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

This too

@t-kelly t-kelly added this to the 0.13.0 milestone Sep 19, 2017
@maximevaillancourt maximevaillancourt self-assigned this Sep 19, 2017
@maximevaillancourt maximevaillancourt merged commit 8cdb04c into master Sep 20, 2017
@maximevaillancourt maximevaillancourt deleted the add-gift-card-initial-value branch September 20, 2017 14:09
@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto Select gift card code
3 participants