Skip to content
This repository was 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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/slate-theme/src/templates/gift_card.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@

<img src="{{ 'gift-card/card.jpg' | shopify_asset_url }}" alt="Gift card illustration">

{%- assign initial_value_size = formatted_initial_value | size -%}
<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


{% 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.

{% endif %}

{%- assign code_size = gift_card.code | format_code | size -%}
Expand Down