Създаване и редактиране на шаблони с помощта на Shopify Order Printer
Можете да създавате и редактирате шаблони с помощта на приложението Shopify Order Printer във Вашия администраторски панел на Shopify. По подразбиране приложението Shopify Order Printer включва следните шаблони:
- Фактура: Фактура, която можете да изпратите на клиент
- Опаковъчен списък: Разпечатка на адреса на Вашия магазин и адреса за доставка на Вашия клиент.
- Списък с елементи за вземане: Документ, който включва списък с артикули, които трябва да бъдат взети, за да се изпълни поръчката на Вашия клиент.
Можете да използвате Liquid, за да създавате свои собствени персонализирани шаблони за други вложки за опаковки, като например талони, етикети или разписки. Приложението Shopify Order Printer поддържа шаблони, създадени с HTML, CSS и променливи на Liquid.
На тази страница
Съображения при създаването на шаблони в приложението Shopify Order Printer
Прегледайте следните съображения, преди да създадете шаблони в приложението Shopify Order Printer:
- За да създавате или редактирате шаблони в приложението Shopify Order Printer, са необходими познания по HTML, CSS и Liquid. Екипът на Shopify за поддръжка на теми може да помогне с малки корекции на безплатни теми на Shopify в рамките на Политиката за дизайн на Shopify. Ако имате нужда от по-сложни промени или използвате тема, която не е създадена от Shopify, обмислете възможността да наемете Партньор на Shopify.
- Можете да създадете до 15 различни шаблона.
- Прегледайте справочника за променливи и филтри на Liquid за Shopify Order Printer за всички поддържани персонализации на шаблони.
Създаване на шаблон
Можете да създадете нов шаблон за Вашия документ за поръчка.
За да настроите шаблон за списък с елементи за вземане, направете справка с Настройване и отпечатване на списъци с елементи за вземане с помощта на приложението Shopify Order Printer.
Стъпки:
От Вашия администраторски панел на Shopify отидете в Приложения > Order Printer.
Кликнете върху Шаблони.
Кликнете върху Създаване на шаблон.
В полето Име въведете име за Вашия шаблон, като например етикет или талон.
В раздел Редактиране на код добавете HTML, CSS или Liquid код, за да създадете своя шаблон.
По избор: За да прегледате своя шаблон, кликнете върху Преглед.
Кликнете върху Запазете.
Редактиране на шаблон
Можете да редактирате съществуващ шаблон. Научете повече за персонализирането на шаблони на Order Printer.
Стъпки:
От Вашия администраторски панел на Shopify отидете в Приложения > Order Printer.
Кликнете върху Шаблони.
Кликнете върху шаблона, който искате да редактирате.
В раздел Редактиране на код добавете или редактирайте HTML, CSS или Liquid код.
По избор: За да прегледате своя шаблон, кликнете върху Преглед.
Кликнете върху Запазете.
Възстановяване на шаблон по подразбиране
Можете да възстановите вградените шаблони за опаковъчен списък и фактура до техните стойности по подразбиране. Използвайте следните кодови блокове, за да възстановите шаблоните си до състоянието им по подразбиране.
Шаблон по подразбиране за фактура
Версия от 6 юни 2024 г.
<div>
<div class="columns">
<h1>Invoice</h1>
<div>
<p style="text-align: right; margin: 0;">
Order {{ order.order_name }}<br />
{% if order.po_number %}PO # {{ order.po_number }}<br />{% endif %}
{{ order.created_at | date: "%B %e, %Y" }}
</p>
</div>
</div>
<div class="columns" style="margin-top: 1.5em;">
<div class="address">
<strong>From</strong><br/>
{{ shop.name }}<br/>
{{ shop.address | format_address }}
{% if shop.phone %}{{ shop.phone }}{% endif %}
</div>
{% if order.billing_address %}
<div class="address">
<strong>Bill to</strong>
{{ order.billing_address | format_address }}
</div>
{% endif %}
{% if order.shipping_address %}
<div class="address">
<strong>Ship to</strong>
{{ order.shipping_address | format_address }}
{% if order.shipping_address.phone %}{{ order.shipping_address.phone }}{% endif %}
</div>
{% endif %}
</div>
<hr />
<h2>Order Details</h2>
<table class="table-tabular" style="margin: 1em 0 0 0;">
<thead>
<tr>
<th scope="col">Qty</th>
<th scope="col">Item</th>
<th scope="col" style="text-align: right;">Price</th>
</tr>
</thead>
<tbody>
{% for line_item in order.line_items %}
<tr>
<td scope="row">{{ line_item.quantity }}</td>
<td>{{ line_item.title }}
{% if line_item.line_level_discount_allocations.size > 0 %}
<span class="subduedText">
{% for discount_allocation in line_item.line_level_discount_allocations %}
<br>{{ discount_allocation.discount_application.title }} (-{{ discount_allocation.amount | money }})
{% endfor %}
</span>
{% endif %}
</td>
<td style="text-align: right;">
{% if line_item.original_price != line_item.final_price %}
<span class="subduedText"><s>{{ line_item.original_price | money }}</s></span>
{% endif %}
{{ line_item.final_price | money }}
</td>
</tr>
{% endfor %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">Subtotal</td>
<td style="text-align: right;">{{ order.line_items_subtotal_price | money }}</td>
</tr>
{% for discount_application in order.cart_level_discount_applications %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">{% if discount_application.title %}<span class="subduedText">{{ discount_application.title }}</span>{% endif %}</td>
<td style="text-align: right;">-{{ discount_application.total_allocated_amount | money }}</td>
</tr>
{% endfor %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">Tax</td>
<td style="text-align: right;">{{ order.tax_price | money }}</td>
</tr>
{% if order.shipping_address %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">Shipping</td>
<td style="text-align: right;">{{ order.shipping_price | money }}</td>
</tr>
{% endif %}
<tr>
<td scope="row" colspan="2" style="text-align: right;"><strong>Total</strong></td>
<td style="text-align: right;"><strong>{{ order.total_price | money }}</strong></td>
</tr>
{% if order.net_payment != order.total_net_amount %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">Total Paid</td>
<td style="text-align: right;">{{ order.net_payment | money }}</td>
</tr>
{% endif %}
{% if order.total_refunded_amount > 0 %}
<tr>
<td scope="row" colspan="2" style="text-align: right;">Total Refunded</td>
<td style="text-align: right;">-{{ order.total_refunded_amount | money }}</td>
</tr>
{% endif %}
{% if order.net_payment != order.total_net_amount %}
<tr>
<td scope="row" colspan="2" style="text-align: right;"><strong>Outstanding Amount</strong></td>
<td style="text-align: right;"><strong>{{ order.total_price | minus: order.net_payment | money }}</strong></td>
</tr>
{% endif %}
</tbody>
</table>
{% if transactions.size > 1 %}
<h2>Transaction Details</h2>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th scope="col">Type</th>
<th scope="col">Amount</th>
<th scope="col">Kind</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
<tr>
<td scope="row">{{ transaction.gateway | payment_method }}</td>
<td>{{ transaction.amount | money }}</td>
<td>{{ transaction.kind }}</td>
<td>{{ transaction.status }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if order.note %}
<h2>Note</h2>
<p>{{ order.note }}</p>
{% endif %}
<p style="margin-bottom: 0;">If you have any questions, please send an email to <u>{{ shop.email }}</u></p>
</div>Шаблон по подразбиране за опаковъчен списък
Версия от 6 юни 2024 г.
<div>
<div class="columns">
<h1>Packing Slip</h1>
<div class="address">
<p style="text-align: right; margin: 0;">
Order {{ order.order_name }}<br />
{% if order.po_number %}PO # {{ order.po_number }}<br />{% endif %}
{{ order.created_at | date: "%B %e, %Y" }}
</p>
</div>
</div>
<div class="columns" style="margin-top: 1.5em;">
<div class="address">
<strong>From</strong><br/>
{{ shop.name }}<br/>
{{ shop.address | format_address }}
</div>
{% if order.shipping_address %}
<div class="address">
<strong>Ship to</strong>
{{ order.shipping_address | format_address }}
</div>
{% endif %}
</div>
<hr />
<h2>Order Details</h2>
<table class="table-tabular" style="margin: 1em 0 0 0;">
<thead>
<tr>
<th scope="col" style="width: 15%; text-align: left;">Qty</th>
<th scope="col" style="width: 85%; text-align: left;">Item</th>
</tr>
</thead>
<tbody>
{% for line_item in order.line_items %}
<tr>
<td scope="row" style="text-align: left;">{{ line_item.quantity }}</td>
<td style="text-align: left;">{{ line_item.title }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>