0

In Order Email Template we used var order.getTotal,var order.getSubTotal,When we used this variable currency symbol is not showing.How to show it Plz guide me.

This is screenshot where i want currency symbol: https://i.sstatic.net/4ghQ5.png module_sales/view/forntend/email/order_new.html `

<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<!--@subject {{trans "Your %store_name order confirmation" store_name=$store.getFrontendName()}} @-->
<!--@vars {
"var formattedBillingAddress|raw":"Billing Address",
"var order.getEmailCustomerNote()":"Email Order Note",
"var order.increment_id":"Order Id",
"layout handle=\"sales_email_order_items\" order=$order area=\"frontend\"":"Order Items Grid",
"var payment_html|raw":"Payment Details",
"var formattedShippingAddress|raw":"Shipping Address",
"var order.getShippingDescription()":"Shipping Description",
"var shipping_msg":"Shipping message",
"var order.getSubtotal()":"Order Subtotal"
} @-->

{{template config_path="design/email/header_template"}}

<table>
    <tr class="email-intro">
        <td>
            <p class="greeting">{{trans "%customer_name," customer_name=$order.getCustomerName()}}</p>
            <p>
                {{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}
                {{trans "Once your package ships we will send you a tracking number."}}
                {{trans 'You can check the status of your order by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}
            </p>
            <p>
                {{trans 'If you have questions about your order, you can email us at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
                {{depend store_hours}}
                    {{trans 'Our hours are <span class="no-link">%store_hours</span>.' store_hours=$store_hours |raw}}
                {{/depend}}
            </p>
        </td>
    </tr>
    <tr class="email-summary">
        <td>
            <h1>{{trans 'Your Order <span class="no-link">#%increment_id</span>' increment_id=$order.increment_id |raw}}</h1>
            <p>{{trans 'Placed on <span class="no-link">%created_at</span>' created_at=$order.getCreatedAtFormatted(2) |raw}}</p>
        </td>
    </tr>
    <tr class="email-information">
        <td>
            {{depend order.getEmailCustomerNote()}}
            <table class="message-info">
                <tr>
                    <td>
                        {{var order.getEmailCustomerNote()|escape|nl2br}}
                    </td>
                </tr>
            </table>
            {{/depend}}
            <table class="order-details">
                <tr>
                    <td class="address-details">
                        <h3>{{trans "Billing Info"}}</h3>
                        <p>{{var formattedBillingAddress|raw}}</p>
                    </td>
                    {{depend order.getIsNotVirtual()}}
                    <td class="address-details">
                        <h3>{{trans "Shipping Info"}}</h3>
                        <p>{{var formattedShippingAddress|raw}}</p>
                    </td>
                    {{/depend}}
                </tr>
                <tr>
                    <td class="method-info">
                        <h3>{{trans "Payment Method"}}</h3>
                        {{var payment_html|raw}}
                    </td>
                    {{depend order.getIsNotVirtual()}}
                    <td class="method-info">
                        <h3>{{trans "Shipping Method"}}</h3>
                        <p>{{var order.getShippingDescription()}}</p>
                        {{if shipping_msg}}
                        <p>{{var shipping_msg}}</p>
                        {{/if}}
                    </td>
                    {{/depend}}
                </tr>
            </table>
            {{layout handle="sales_email_order_items" order=$order area="frontend"}}
        </td>
    </tr>
</table>

{{template config_path="design/email/footer_template"}}
`
This is New Template in admin :`{{template config_path="design/email/header_template"}}

<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td class="wid50" style="width:50%;padding:5px 10px;    text-align: left;"><p style="color:grey">Hi <b style="color:#000;">{{trans "%customer_name," customer_name=$order.getCustomerName()}}</b></p>
</td> 
<td class="wid50" style="width:50%;padding:5px 10px;    text-align: right;"><p style="color:grey">{{trans 'Order Placed to <b style="color:#000;"><span class="no-link">%created_at</span>' created_at=$order.getCreatedAtFormatted(2) |formatDateTime: Y-m-d|raw}}</b><p>
</td>
</tr>
<tr>
<td class="wid50" style="width:50%;padding:5px 10px;    text-align: left;"><p style="color:grey;">Your order has been successfully placed.</p> 
</td>
<td class="wid50" style="width:50%;padding:5px 10px;    text-align: right;">
<p style="color:grey;">
{{trans 'Order Number <b style="color:#000;"></b<span class="no-link">%increment_id</span>' increment_id=$order.increment_id |raw}}</p>
</td>
</tr>
</table>
<br /><br />

<table width="100%" cellpadding="2" cellspacing="2" style="border: 1px solid #139b3b;">
<tr>
<td class="wid50" style="width:50%;vertical-align: top;padding:5px 10px;    text-align: left;"><p style="float:left">Delivery by <span style="color:#139B3B"> {{var order.getDeliveryDate()}}</span></p>



</td>

<td class="wid50" style="width:50%;vertical-align: top;padding:5px 10px;    text-align: right;">
<p class="centrtext"><b>Delivery Address</b></p> 
 <p class="centrtext"><span>{{var formattedBillingAddress|raw}}</span></p>
 </td>
 </tr>
 <tr>
 <td class="wid50" style="width:50%;vertical-align:top;padding:5px 10px;    text-align: left;">
  <p style="float:left">Amount Paid <span style="color:#139B3B">{{var order.getGrandTotal()}}</span></p> 

  </td>
 </tr>
 <tr>
 <td colspan="2" style="padding:5px 10px;">
 <p>You will receive the next update when the item in your order is packed/shipped by the seller.</p>
 </td>
 </tr>
 </table>
<br /><br />
 <table width="100%" cellpadding="2" cellspacing="2">
 <tr>
 <td class="wid20" style="    width: 20%;text-align: center;padding: 5px 10px;border: 1px solid #e8e8e8;background: #e8e8e8;">
{{layout handle="sales_email_order_items" order=$order area="frontend"}} 
 </td>
 </tr>
 </table>
<br /><br />
<table width="100%" cellpadding="2" cellspacing="2">
 <tr>
 <td style="text-align:right;padding:5px10px;">
 <p class="centrtext"><span><b>Item(s) Total:</b> {{var order.getGrandTotal()}}</span></p>
 </td>
 </tr>
 <tr>
 <td style="text-align:right;padding:5px 10px;">
<p class="centrtext"><span><b>Amount Paid:</b> {{var order.getGrandTotal()}}</span></p>
 </td>
 </tr>


 </table>

  <footer>
<table width="100%" cellpadding="2" cellspacing="2" style="text-align:center">
<tr>
<td style="padding:5px 10px;">
 <p  style="text-align:left"><b>Thank you for shopping with Fox Ministry!</b></p>
</td style="padding:5px 10px;">
</tr>
<tr> 
<td>
<p>Got Questions? Please get in touch with our Customer Care at <b>+91 (11) 41066756</b> (ALL DAYS | 9AM TO 10PM)

</p>
</td>
</tr>
  </table>
</footer>
{{template config_path="design/email/footer_template"}}`
7
  • it's your custom template or magento default template? Commented Nov 16, 2018 at 5:10
  • Its custom template Commented Nov 16, 2018 at 5:21
  • Did you create observer or controller for that ? Then, post code here please. Commented Nov 16, 2018 at 5:27
  • I will override file module_sales/view/frontend/email/order_new.html.In this file we create two variable.Code is Commented Nov 16, 2018 at 5:36
  • Upload your all files code which is related to price. Commented Nov 16, 2018 at 5:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.