Skip to content

Commit 76742e0

Browse files
committed
[FIX] CMS_STRICT_VARIABLES, see OFFLINE-GmbH#5 + [FIX] missing translation strings
1 parent b7b6567 commit 76742e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+77
-83
lines changed

components/cart/table/entry.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</div>
3535
</td>
3636
<td class="text-right">
37-
{% partial __SELF__ ~ '::table/quantitydropdown' product=product %}
37+
{% partial 'cart::table/quantitydropdown' product=product %}
3838
</td>
3939
<td class="text-right">
4040
{{ product.price()|raw }}

components/product/addtocart.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% endif %}
1010
</div>
1111
{% endif %}
12-
{% if stock > 0 or item.allow_out_of_stock_purchases %}
12+
{% if stock|default(0) > 0 or item.allow_out_of_stock_purchases %}
1313
<div class="mall-product__add-to-cart-form">
1414
<div class="mall-form-control">
1515
<label for="quantity">{{ 'offline.mall::frontend.quantity'|trans }}</label>

components/product/customfields.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% for field in fields %}
2-
<div class="mall-product__property mall-product__property--custom-field {{ field.required ? 'is-required' : '' }}">
1+
{% for field in fields|default([]) %}
2+
<div class="mall-product__property mall-product__property--custom-field {{ field.required|default(false) ? 'is-required' : '' }}">
33
{% partial __SELF__ ~ '::customfields/' ~ field.type field=field %}
44
</div>
55
{% endfor %}

components/product/customfields/color.htm

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,20 @@
22
<div class="mall-form-control">
33
<label for="{{ fieldId }}" class="mall-label">{{ field.name }}</label>
44
<div class="mall-field-color-selector">
5-
{% if field.custom_field_options.count > 0 %}
5+
{% if field.custom_field_options.count|default(0) > 0 %}
66
<input type="hidden" id="{{ fieldId }}" name="fields[{{ field.hashId }}]"
77
data-id="{{ item.property.hashId }}"
8-
data-mall-custom-field
9-
>
10-
{% for option in field.custom_field_options %}
8+
data-mall-custom-field />
9+
10+
{% for option in field.custom_field_options|default([]) %}
1111
<a class="mall-option-selector" data-target="#{{ fieldId }}" data-value="{{ option.hashId }}">
12-
<span style="background: {{ option.option_value }}; width: 20px; height: 20px; display: inline-block;
13-
"></span>
12+
<span style="background: {{ option.option_value }}; width: 20px; height: 20px; display: inline-block;"></span>
1413
</a>
1514
{% endfor %}
1615
{% else %}
1716
<input type="color" id="{{ fieldId }}" name="fields[{{ field.hashId }}]"
1817
data-id="{{ item.property.hashId }}"
19-
data-mall-custom-field
20-
>
18+
data-mall-custom-field />
2119
{% endif %}
2220
</div>
2321
<div data-validate-for="{{ field.hashId }}"></div>

components/product/customfields/dropdown.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
data-id="{{ item.property.hashId }}"
66
data-mall-custom-field>
77
<option value="">{{ 'offline.mall::frontend.select'|trans }}</option>
8-
{% for option in field.custom_field_options %}
8+
{% for option in field.custom_field_options|default([]) %}
99
<option value="{{ option.hashId }}">{{ option.name }}</option>
1010
{% endfor %}
1111
</select>

components/product/customfields/image.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<input type="hidden" data-mall-custom-field id="{{ fieldId }}" name="fields[{{ field.hashId }}]"
55
data-id="{{ item.property.hashId }}">
66
<div class="mall-field-image-selector">
7-
{% for option in field.custom_field_options %}
7+
{% for option in field.custom_field_options|default([]) %}
88
<a class="mall-option-selector" data-target="#{{ fieldId }}" data-value="{{ option.hashId }}">
99
<img src="{{ option.image.thumb(90, 90, null) }}" alt=""/>
1010
</a>

components/product/customfields/text.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<input type="text" class="mall-input" id="field-{{ field.hashId }}"
44
name="fields[{{ field.hashId }}]"
55
data-id="{{ item.property.hashId }}"
6-
data-mall-custom-field>
6+
data-mall-custom-field />
77
<div data-validate-for="{{ field.hashId }}"></div>
88
</div>

components/product/default.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
{% partial __SELF__ ~ '::scripts' %}
1111

12-
{% if __SELF__.dataLayer %}
12+
{% if dataLayer|default(false) %}
1313
{% partial __SELF__ ~ '::datalayer' %}
1414
{% endif %}

components/product/info.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h2 class="mall-product__name">{{ item.name }}</h2>
22

3-
{% if item.description_short %}
3+
{% if item.description_short|default(null) %}
44
<h3 class="mall-product__description-short">{{ item.description_short|nl2br }}</h3>
55
{% endif %}
66

@@ -12,6 +12,6 @@ <h3 class="mall-product__description-short">{{ item.description_short|nl2br }}</
1212

1313
{% partial __SELF__ ~ '::images' images=item.all_images %}
1414

15-
{% if __SELF__.showReviews %}
15+
{% if __SELF__.showReviews|default(false) %}
1616
{% component 'productReviews' %}
1717
{% endif %}

components/product/properties/default.htm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
class="js-mall-property-selector"
55
data-mall-property>
66
{% for value in item.values %}
7-
<option value="{{ value.hashId }}"
8-
{% if propertyValue.value == value.value %}
9-
selected
10-
{% endif %}
11-
>
7+
<option value="{{ value.hashId }}" {% if propertyValue.value == value.value %}selected{% endif %}>
128
{{ value.display_value|raw }} {{ item.property.unit }}
139
</option>
1410
{% endfor %}

0 commit comments

Comments
 (0)