Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email template variable #141

Open
blackyzero opened this issue Feb 25, 2021 · 4 comments
Open

Email template variable #141

blackyzero opened this issue Feb 25, 2021 · 4 comments
Labels

Comments

@blackyzero
Copy link

Hello,

Where could i get variables for email template?
From current template "lovata.ordersshopaholic::mail.create_order_manager/user, i only know {{ order_number }}, {{site_url}}

I am looking for following info:
Billing, Shipping, Detail order items, shipping type/method, discount, total.

Thanks in advances.

@blackyzero
Copy link
Author

Hi,

Any update on this? By now, the email doesn't show much info for the order, please see attached image for more detail.

https://ibb.co/XX4NhLr

Appreciate your help.
Thank you.

@mennax
Copy link

mennax commented Apr 7, 2021

Hi,

Any update on this? By now, the email doesn't show much info for the order, please see attached image for more detail.

https://ibb.co/XX4NhLr

Appreciate your help.
Thank you.

Hi,
this is my template:

A new order {{ order_number }} was created on the <a href="{{ site_url }}">site</a>.

Buongiorno {{ user_item.name }},

Ti confermiamo che l'ordine N. <b>{{ order_number }}</b> è stato creato con successo.

Data: {{ order.created_at|date("D j F \\a\\l\\l\\e G:i") }}

Numero: {{ order.order_number }}

Pagamento: {{ order.payment_method.name }}

Spedizione: {{ order.shipping_type.name }}

{% set obPriceData = order.total_price_data %}

<h4>Riepilogo dell'ordine:</h4>

<table class="table" style="width:100%;background-color:#eee;padding:9px;">
<tr>
<th style="text-align:left;font-weight:normal;border-bottom:1px solid #ccc;">Prodotto</th>
<th style="text-align:left;font-weight:normal;border-bottom:1px solid #ccc;">Prezzo</th>
<th style="text-align:center;font-weight:normal;border-bottom:1px solid #ccc;">Quantità</th>
<th style="text-align:right;font-weight:normal;font-style:italic;border-bottom:1px solid #ccc;">Totale</th>
</tr>
{% for position in order.order_position %}

{% set obOffer = position.item %}
{% set obProduct = obOffer.product %}
{% set posPriceData = position.price_data %}
{{ obProduct.brand.name }}
<tr>
<td style="border-bottom: 1px solid #ddd;"><b>{{ obProduct.name }}</b><br>{{ obOffer.name }}</td><td style="border-bottom: 1px solid #ddd;">{{ position.price }}</td><td style="text-align:center;border-bottom: 1px solid #ddd;">{{ position.quantity }}</td><td style="text-align:right;border-bottom: 1px solid #ddd;">{{ position.currency_symbol }} {{ posPriceData.price_with_tax }}</td>
</tr> 
{% endfor %}
</table>
<p> </p>

Costi di spedizione: {{ order.shipping_price }}

<b>Importo totale: {{ obPriceData.price_with_tax }}</b>

<h4>Indirizzo di spedizione:</h4>

{{ order.property.shipping_street }}

{{ order.property.shipping_postcode }} {{ order.property.shipping_city }} - Prov. {{ order.property.shipping_state }}

Località: {{ order.property.shipping_address1 }}

<hr>

Vai alla pagina dei <a href="http://{{ site_url }}/user/user-orders">tuoi ordini</a> per vedere il dettaglio.

A presto

Il team di <a href="http://{{ site_url }}">MyShop</a>

@blackyzero
Copy link
Author

Thanks @mennax . These help a lot.

The shipping postcode doesn't show in my email contain although it's input during customer order.
In addition, what are the variable for telephone, country, coupon discount value? I tried to add it like {{ order.property.shipping_country }} or {{ order.property.shipping_telephone }} but it doesn't show.

Thanks again.

@mennax
Copy link

mennax commented Jul 22, 2021

I only read now. You solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants