Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to use smarty tags in language variable

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-11-2007, 01:46 AM
 
Allwrite Allwrite is offline
 

Member
  
Join Date: Feb 2007
Location: The Netherlands
Posts: 23
 

Default 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!
__________________
Dennis Gaasbeek

www.allwrite.eu (work in progress, not active yet)
X-Cart Gold v4.1.8
Reply With Quote
  #2  
Old 07-11-2007, 02:30 AM
 
Allwrite Allwrite is offline
 

Member
  
Join Date: Feb 2007
Location: The Netherlands
Posts: 23
 

Default 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
__________________
Dennis Gaasbeek

www.allwrite.eu (work in progress, not active yet)
X-Cart Gold v4.1.8
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:28 PM.

   

 
X-Cart forums © 2001-2020