X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to use smarty tags in language variable (https://forum.x-cart.com/showthread.php?t=32469)

Allwrite 07-11-2007 01:46 AM

How to use smarty tags in language variable
 
Hi everyone,

I am editing the file /mail/html/order_invoice.tpl because I want to include our bank details. So I created a custom language entry (eml_invoice_bank_transfer) that contains some basic HTML code. The problem I have is that on the last line I want to include a smarty tag, like so:

PHP Code:

<font color="#C00000"><b>Please mention the order id ({$order.orderid}) when effecting payment.</b></font><br /> 


So, in theory our customers will see the following text on their invoice/e-mail:

Please mention the order id (115) when effecting payment.

But this doesn't work as the
{$order.orderid} is not converted to the actual order number. The final text is just displayed as:

Please mention the order id ({$order.orderid}) when effecting payment.

Does anyone know how I can accomplish this? I'm new to X-Cart so I don't quite understand how it all works. If I include $order.orderid in order_invoice.tpl it works just fine. Thanks a lot in advance!

Allwrite 07-11-2007 02:30 AM

Re: How to use smarty tags in language variable
 
For now I've found a workaround for this problem but I am still interested in info on including the tags in language files. The workaround I am now using is:

In order_invoice.tpl:

PHP Code:

<br />{$lng.eml_invoice_bank_transfer} <font color="#C00000"><b>{$lng.lbl_order_id#{$order.orderid}</b></font><br /><br /> 


And then in eml_invoice_bank_transfer I first start with our bank details and end with:

PHP Code:

<font color="#C00000"><b>When effecting payment please mention:</b></font


Which generates:

When effecting payment please mention: Order id #123


All times are GMT -8. The time now is 07:24 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.