Você está na página 1de 5

SUPORTE COMERCIAL | COMMERCIAL PARTNESHIPS

Bullstock - Victor Hugo: +55 (12) 9 8210-6278


Easycoding - Paulo Glauberto: +55 (87) 9 9172-1856

<!--
Esse trecho de código Liquid é usado para compor o corpo de um e-mail de
confirmação de compra.
Ele começa definindo duas variáveis: "email_title" e "email_body", que serão
usadas posteriormente no e-mail.
Dentro do bloco "email_body", há uma estrutura condicional (if/else) que verifica
se o pedido requer envio (requires_shipping).
Se sim, há um switch (case) que verifica o método de entrega (delivery_method)
escolhido pelo cliente.
Dependendo do método, uma mensagem personalizada é exibida, incluindo o nome do
cliente (customer.first_name)
usando a interpolação de variáveis com o uso das chaves duplas {{ }}.
Em seguida, há outra condição que verifica se há instruções de entrega
(delivery_instructions) e, se houver,
as exibe na mensagem de e-mail.
Além disso, se houver um tempo estimado de entrega consolidado
(consolidated_estimated_delivery_time), ele também é exibido.
Caso o pedido não precise ser enviado, nenhuma informação sobre o método de entrega
é exibida e o corpo do e-mail se concentra
em agradecer ao cliente pela compra.
Note que, como se trata de uma linguagem de template,
as variáveis e condições do código Liquid serão substituídas por valores
específicos de acordo com o contexto da página ou
e-mail em que estão sendo usados.
-->

{% capture email_title %} Obrigado por sua compra! {% endcapture %}


{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when 'pick-up' %}
Você receberá um e-mail assim que seu pedido estiver pronto para retirada.
{% when 'local' %}
Olá {{ customer.first_name }}! Estamos preparando seu pedido para entrega.
{% else %}
Olá {{ customer.first_name }}! Estamos preparando seu pedido para envio.
Iremos notificá-lo assim que o pedido for enviado.
{% endcase %}
{% if delivery_instructions != blank %}
<p><b>Informação de entrega:</b> {{ delivery_instructions }}</p>
{% endif %}
{% if consolidated_estimated_delivery_time %}
<p>
entrega estimada <b>{{ consolidated_estimated_delivery_time }}</b>
</p>
{% endif %}
{% endif %}
{% endcapture %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Email BullStock - Confirmação de Pedido</title>
</head>
<body style="background: white;">
<div class="Bullstock" style="background: #F5F5F5;">

<!-- Tabela 1 Logo-->

<table cellpadding="0" cellspacing="0" border="0" width="100%">


<tbody>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="600"
align="center">
<tbody>
<tr>
<td style="padding: 20px;text-align: center;">
<img
src="https://cdn.shopify.com/s/files/1/0658/6898/8647/files/bull-removebg-
preview_e55c65d8-085a-4c32-92ca-a00a64fc75b5_480x480.png?v=1682636968" width="100"
style="margin-top: -14px;margin-bottom: -34px;">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

<!-- Table 2 Banner - Menu -->

<table cellpadding="0" cellspacing="0" border="0" width="600" align="center"


style="background: #ffffff;">
<tr>
<td style="padding: 20px 0;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="text-align: center;">
<img
src="https://cdn.shopify.com/s/files/1/0658/6898/8647/files/EmailsPersonalizados_1_
580x480.png?v=1682637178" alt="Seu Banner" style="max-width: 100%;">
</td>
</tr>
<tr>
<td style="text-align: center; padding-top: 20px;">
<ul style="list-style-type: none; margin: 0; padding: 0;">
<li style="display: inline-block; margin-right: 20px;"><a
href="#" style="text-decoration: none; color: #000; font-weight:
600;">Inicio</a></li>
<li style="display: inline-block; margin-right: 20px;"><a
href="#" style="text-decoration: none; color: #000; font-weight:
600;">Sale</a></li>
<li style="display: inline-block; margin-right: 20px;"><a
href="#" style="text-decoration: none; color: #000; font-weight: 600;">Man</a></li>
<li style="display: inline-block; margin-right: 20px;"><a
href="#" style="text-decoration: none; color: #000; font-weight:
600;">Women</a></li>
</ul>
</td>
<tr>
<td style="text-align: center;">
<img
src="https://cdn.shopify.com/s/files/1/0658/6898/8647/files/sacola-
verificada_480x480.png?v=1682641864" style="width: 86px;
margin-bottom: -35px">
<h1>Olá {{ customer.first_name }}!</h1>
<h2>Sua compra de número {{ order_name }} foi
confirmada!</h2>
</td>
</tr>
</tr>
</table>
</td>
</tr>
</table>

<!-- Tabela 3 Informações de pedido -->

<table cellpadding="10" cellspacing="10" width="600" align="center"


style="background: #ffffff; align-items: center; margin: 0 auto;">
<tbody>
<tr>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid
#e5e5e5;width: 100%;">
<p style="font-weight: bold;">Número do pedido: {{ order.order_number
}}</p>
</td>
</tr>

{% for item in order.line_items %}

<tr>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid
#e5e5e5;">
<img src="{{ item.image | img_url: 'medium' }}"
alt="{{ item.title }}" style="width: 150px; float: left; margin-right: 20px;">
<div style="display: inline-block;">
<p style="font-weight: bold;">Produto: {{ item.title }}</p>
<p style="font-weight: bold;">Quantidade: {{ item.quantity }}</p>
<p style="font-weight: bold;">Preço: {{ item.price | money }}</p>
<p style="font-weight: bold;">Desconto: {{ item.total_discount |
money }}</p>
</div>
</td>
</tr>

{% endfor %}

<tr>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid
#E5E5E5;">
<p style="font-weight: bold;">Subtotal: {{ order.subtotal_price |
money }}</p>
<p style="font-weight: bold;">Total: {{ order.total_price |
money }}</p>
</td>
</tr>
</tbody>
</table>

<!-- Informações do Cliente -->

<table cellpadding="10" cellspacing="10" width="600" align="center"


style="background: #ffffff; align-items: center; margin: 0 auto;">
<tbody>
<tr>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid #e5e5e5;"
colspan="2">
<p style="font-weight: bold;">Informações do cliente</p>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid
#e5e5e5;">
<p style="font-weight: bold;">Endereço de entrega</p>
<p>{{ shipping_address | format_address }}</p>
</td>
<td bgcolor="#f7f7f7" style="padding: 10px; border: 4px solid
#e5e5e5;">
<p style="font-weight: bold;">Endereço de faturamento</p>
<p>{{ billing_address | format_address }}</p>
</td>
</tr>

<!--Banner Rodape -->

<table cellpadding="0" cellspacing="10" border="0" width="600" align="center"


style="background: #ffffff; align-items: center;">
<tbody>
<tr>
<td style="display: flex; justify-content: center; width: 100%; text-
align: center; margin-top: -10px;">
<img
src="https://cdn.shopify.com/s/files/1/0658/6898/8647/files/Bannerrodape_580x480.pn
g?v=1682637218" alt="Seu Banner" style="max-width: 100%;">
</td>
</tr>
</tbody>
</table>

<table class="rodape" cellpadding="0" cellspacing="0" border="0" width="600"


align="center" style="background: #ffffff; align-items: center;">
<tbody>
<tr>
<td style="text-align: center;">
Todos os direitos reservados Bullstock 2023
</td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="600"
align="center">
<tbody>
<tr>
<td style="padding: 20px;text-align: center;">

</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

</div>

</body>
</html>

<!--
Esse trecho de código em Liquid verifica se os corpos dos documentos "Termos de
Serviço" e "Política de Reembolso"
estão preenchidos e, se sim, os anexa como arquivos PDF com os nomes "AGB" e
"direito de retirada", respectivamente.
O Liquid é uma linguagem de modelagem usada principalmente em plataformas de
comércio eletrônico, como Shopify,
para personalizar e exibir informações dinâmicas em lojas online.
Esse trecho específico de código pode ser usado para automatizar a criação de
versões em PDF de documentos importantes da loja,
como parte de um fluxo de trabalho de gerenciamento de documentos.
-->

{%- if shop.terms_of_service.body != blank -%}


{{ shop.terms_of_service | attach_as_pdf: "AGB" }}
{%- endif -%}

{%- if shop.refund_policy.body != blank -%}


{{ shop.refund_policy | attach_as_pdf: "direito de retirada" }}
{%- endif -%}

Você também pode gostar