Skip to content

Commit

Permalink
Version 2.1
Browse files Browse the repository at this point in the history
1. Добавлен шаблон email (user_message.tpl) для отправки индивидуального
сообщения пользователю.
2. Удалены шаблоны email: test.tpl и test_text.tpl.
3. Добавлен код для отображения текстур вариантов продукта.
  • Loading branch information
GeneticsPro committed Aug 29, 2018
1 parent 7b34a9b commit 119caea
Show file tree
Hide file tree
Showing 19 changed files with 79 additions and 15 deletions.
4 changes: 4 additions & 0 deletions css/style.css
Expand Up @@ -179,6 +179,10 @@ del { font-size: 12px; }
width: 20px;
position: relative;
vertical-align: middle;
overflow: hidden;
}
.minicolors-swatch img {
max-width: none;
}
.small > .minicolors-swatch, small > .minicolors-swatch {
height: 10px;
Expand Down
2 changes: 1 addition & 1 deletion emails/order_buyer.tpl
Expand Up @@ -182,7 +182,7 @@
<br>
{% for variant in product.variants %}
{{ variant.name }}:
{% if variant.type == 'color' %}
{% if variant.type == 'color' or variant.type == 'texture' %}
{{ variant.title }}
{% else %}
{{ variant.value }}
Expand Down
8 changes: 0 additions & 8 deletions emails/test_text.tpl

This file was deleted.

7 changes: 3 additions & 4 deletions emails/test.tpl → emails/user_message.tpl
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>{{ shop_name }} - Тестовое сообщение</title>
<title>{{ shop_name }} - {{ subject }}</title>
<style>
@media only screen and (max-width: 300px) {
.body {
Expand Down Expand Up @@ -116,7 +116,7 @@
<td class="titleblock" style="border-bottom: 1px solid #e2e7eb; padding: 7px 0" align="center">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<span class="title" style="font-weight: 500; font-size: 28px; text-transform: uppercase; line-height: 33px">
Здравствуйте, {{ admin_name }}
Здравствуйте, {{ user_name }}
</span>
</font>
</td>
Expand All @@ -127,8 +127,7 @@
<tr>
<td class="linkbelow" style="padding: 7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
Это <strong>тестовый E-mail</strong> из вашего магазина "{{ shop_name }}".<br />
Если вы можете прочитать его, то тестирование прошло успешно!.
{{ message }}
</font>
</td>
</tr>
Expand Down
4 changes: 4 additions & 0 deletions html/alerts.tpl
Expand Up @@ -33,6 +33,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
6 changes: 5 additions & 1 deletion html/forms/quickorder.tpl
Expand Up @@ -6,7 +6,7 @@

<div class="row">
<div class="col-4 product-image">
<img {{ image | img_exists: '104x150' }} alt="{{ alias }}" />
<img {{ image | img_exists: '104x150' }} alt="{{ alias }}" class="img-fluid" />
{% if present %}
<!--Share (Product as a present)-->
<div class="share hasTooltip" title="{{ 'tooltipText' | jhtml: present.name, present.desc }}">
Expand Down Expand Up @@ -52,6 +52,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.text }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.text }}">
</span>
{% when 'select' %}
<span>
{{ variant.text }}
Expand Down
9 changes: 9 additions & 0 deletions html/forms/variants.tpl
Expand Up @@ -32,6 +32,15 @@
<span style="background-color: {{ attribute.value }};"></span>
</label>
{% endfor %}

{% when 'texture' %}
<!--Texture switches-->
{% for attribute in variant.attributes %}
<label class="minicolors-swatch{% if attribute.default %} main{% endif %}" title="{{ attribute.title }}">
<input type="radio" data-checked="variant-texture" data-attr-title="{{ attribute.title }}" name="variant-{{ product }}-{{ variant.id }}" value="{{ attribute.value }}"{% if attribute.default %} checked{% endif %}>
<img src="{{ attribute.img }}" alt="{{ attribute.alt }}">
</label>
{% endfor %}

{% endcase %}
</div>
Expand Down
6 changes: 5 additions & 1 deletion html/forms/waitinglist.tpl
Expand Up @@ -6,7 +6,7 @@

<div class="row">
<div class="col-4 product-image">
<img {{ image | img_exists: '104x150' }} alt="{{ alias }}" />
<img {{ image | img_exists: '104x150' }} alt="{{ alias }}" class="img-fluid" />
{% if present %}
<!--Share (Product as a present)-->
<div class="share hasTooltip" title="{{ 'tooltipText' | jhtml: present.name, present.desc }}">
Expand Down Expand Up @@ -52,6 +52,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.text }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.text }}">
</span>
{% when 'select' %}
<span>
{{ variant.text }}
Expand Down
4 changes: 4 additions & 0 deletions html/order/products.tpl
Expand Up @@ -62,6 +62,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/cart/horizontally.tpl
Expand Up @@ -41,6 +41,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/cart/icon.tpl
Expand Up @@ -46,6 +46,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/cart/popover.tpl
Expand Up @@ -46,6 +46,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/cart/vertically.tpl
Expand Up @@ -73,6 +73,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/compare/categories.tpl
Expand Up @@ -39,6 +39,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions modules/wishlist/vertically.tpl
Expand Up @@ -75,6 +75,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions views/cart/default.tpl
Expand Up @@ -128,6 +128,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
8 changes: 8 additions & 0 deletions views/compare/default.tpl
Expand Up @@ -50,6 +50,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down Expand Up @@ -181,6 +185,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }}" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions views/order/order.tpl
Expand Up @@ -71,6 +71,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }};" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down
4 changes: 4 additions & 0 deletions views/wishlist/default.tpl
Expand Up @@ -194,6 +194,10 @@
<span class="minicolors-swatch">
<span style="background-color: {{ variant.value }}" title="{{ variant.title }}"></span>
</span>
{% when 'texture' %}
<span class="minicolors-swatch">
<img src="{{ variant.img }}" alt="{{ variant.alt }}" title="{{ variant.title }}">
</span>
{% when 'select' %}
<span>
{{ variant.value }}
Expand Down

0 comments on commit 119caea

Please sign in to comment.