Skip to content

Commit 090e886

Browse files
authored
Merge pull request #20 from GetStoreConnect/v20.0.28
Payment gateways and vouchers 20.0.28
2 parents 9e5e98c + 28f3858 commit 090e886

30 files changed

Lines changed: 1015 additions & 409 deletions

controllers.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,4 @@ sitemap,show
147147
product_categories,index
148148
product_categories,show
149149
vouchers,show
150+
voucher_activations,create

templates/blocks/slideshow.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{%- if children_content != blank %}
1010
{%- require "scripts/slider.js" -%}
1111

12-
<div class="Slider" data-slideshow="{{ content_block.identifier }}">
12+
<div class="SC-Slider" data-slideshow="{{ content_block.identifier }}">
1313
{{ children_content }}
1414
</div>
1515
{%- else %}

templates/pages/product_category.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{%- render "search/filters/sort_dropdown" %}
3232
</menu>
3333

34-
{%- if current_product_category.introduction_content %}
34+
{%- if current_product_category.introduction_content != blank %}
3535
<div class="SC-ProductCategoryIntroduction sc-rich-text">
3636
{{ current_product_category.introduction_content }}
3737
</div>
@@ -41,7 +41,7 @@
4141
{%- render "products/results", allow_comparisons: true %}
4242
</div>
4343

44-
{%- if current_product_category.information_content %}
44+
{%- if current_product_category.information_content != blank %}
4545
<div class="SC-ProductCategoryInformation sc-rich-text">
4646
{{ current_product_category.information_content }}
4747
</div>

templates/pages/voucher.liquid

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,89 @@
11
{%- default voucher: nil %}
22

33
<div class="sc-container sc-container-spacious">
4-
{%- render "shared/page_header", heading: "t.vouchers.show.heading", sub_heading: current_request.params["code"] %}
5-
64
{%- if voucher == blank %}
75
{% if current_request.params.code != blank %}
86
<div class="sc-mt-large sc-mb-large">
97
{{ "vouchers.show.not_found" | t }}
108
</div>
119
{%- endif %}
1210
{%- else %}
13-
<table class="sc-compact sc-mb-large">
14-
<tr>
15-
<th>{{ "vouchers.show.balance" | t }}</th>
16-
<th>{{ "vouchers.show.expires" | t }}</th>
17-
</tr>
18-
<tr>
19-
<td data-th="{{ "vouchers.show.balance" | t }}">{{ voucher.current_balance | money }}</td>
20-
<td data-th="{{ "vouchers.show.expires" | t }}">
21-
{%- if voucher.expires_at == blank %}
22-
{{ "vouchers.show.no_expiry" | t }}
23-
{%- else %}
24-
{% render "shared/date", timestamp: voucher.expires_at %}
25-
{%- endif %}
26-
</td>
27-
</tr>
28-
</table>
29-
{%- if voucher.orders.size > 0 %}
30-
<h2>{{ "vouchers.show.orders.heading" | t }}</h2>
31-
<table class="sc-compact sc-mb-spacious">
11+
{%- if voucher.requires_activation? %}
12+
{%- render "shared/page_header", heading: "t.vouchers.show.activation_form.heading", sub_heading: current_request.params["code"] %}
13+
{%- else %}
14+
{%- render "shared/page_header", heading: "t.vouchers.show.heading", sub_heading: current_request.params["code"] %}
15+
{%- endif %}
16+
17+
{%- if voucher.requires_activation? %}
18+
<div class="sc-mt-large">
19+
{% form "activate-voucher", voucher: voucher %}
20+
<span>
21+
<input
22+
type="text"
23+
name="activation_code"
24+
placeholder="{{ 'vouchers.show.activation_form.activation_code' | t }}"
25+
class="SC-Field_input"
26+
>
27+
</span>
28+
<span class="sc-pl-medium">
29+
<input
30+
type="submit"
31+
name="commit"
32+
value="{{ 'vouchers.show.activation_form.submit' | t }}"
33+
class="SC-Button SC-Button-small SC-Button-primary sc-font-small"
34+
data-disable-with="{{ 'vouchers.show.activation_form.submit'| t }}"
35+
>
36+
</span>
37+
{% endform %}
38+
</div>
39+
{%- else %}
40+
<table class="sc-compact sc-mb-large sc-mt-large">
41+
<tr>
42+
<th>{{ "vouchers.show.balance" | t }}</th>
43+
<th>{{ "vouchers.show.expires" | t }}</th>
44+
</tr>
3245
<tr>
33-
<th>{{ "vouchers.show.orders.reference" | t }}</th>
34-
<th>{{ "vouchers.show.orders.date" | t }}</th>
35-
<th>{{ "vouchers.show.orders.total" | t }}</th>
46+
<td data-th="{{ "vouchers.show.balance" | t }}"><p class="sc-mt-small">{{ voucher.current_balance | money }}</p></td>
47+
<td data-th="{{ "vouchers.show.expires" | t }}">
48+
<p class="sc-mt-small">
49+
{%- if voucher.expires_at == blank %}
50+
{{ "vouchers.show.no_expiry" | t }}
51+
{%- else %}
52+
{% render "shared/date", timestamp: voucher.expires_at %}
53+
{%- endif %}
54+
</p>
55+
</td>
3656
</tr>
37-
{% for order in voucher.orders %}
57+
</table>
58+
{%- if voucher.orders.size > 0 %}
59+
<h2>{{ "vouchers.show.orders.heading" | t }}</h2>
60+
<table class="sc-compact sc-mb-spacious">
3861
<tr>
39-
<td data-th="{{ "vouchers.show.orders.reference" | t }}"><a href="{{ order.path }}">{{ order.reference }}</a></td>
40-
<td data-th="{{ "vouchers.show.orders.date" | t }}">{% render "shared/date", timestamp: order.ordered_at %}</td>
41-
<td data-th="{{ "vouchers.show.orders.total" | t }}">
42-
{% if order.quotable? %}-{% else %}{{ order.total | money }}{% endif %}
43-
</td>
62+
<th>{{ "vouchers.show.orders.reference" | t }}</th>
63+
<th>{{ "vouchers.show.orders.date" | t }}</th>
64+
<th>{{ "vouchers.show.orders.total" | t }}</th>
4465
</tr>
45-
{%- endfor %}
46-
</table>
66+
{% for order in voucher.orders %}
67+
<tr>
68+
<td data-th="{{ "vouchers.show.orders.reference" | t }}"><a href="{{ order.path }}">{{ order.reference }}</a></td>
69+
<td data-th="{{ "vouchers.show.orders.date" | t }}">{% render "shared/date", timestamp: order.ordered_at %}</td>
70+
<td data-th="{{ "vouchers.show.orders.total" | t }}">
71+
{% if order.quotable? %}-{% else %}{{ order.total | money }}{% endif %}
72+
</td>
73+
</tr>
74+
{%- endfor %}
75+
</table>
76+
{%- endif %}
4777
{%- endif %}
4878
{%- endif %}
4979

5080
{%- if current_request.params["code"] != blank %}
5181
<hr>
5282
<h3 class="sc-mt-large">{{ "vouchers.show.form.heading" | t }}</h3>
83+
{%- else %}
84+
<h1 class="sc-mt-large">{{ "vouchers.show.check_voucher_heading" | t }}</h1>
5385
{%- endif %}
86+
5487
<form>
5588
<div class="SC-Field SC-Field-expand">
5689
<input type="text" name="code" value="{{ current_request.params["code"] }}" placeholder="{{ "vouchers.show.form.code" | t }}" class="SC-Field_input sc-expand">

0 commit comments

Comments
 (0)