View Single Post
  #8  
Old 03-18-2009, 04:29 AM
  photo's Avatar 
photo photo is offline
 

X-Wizard
  
Join Date: Feb 2006
Location: UK
Posts: 1,146
 

Default Re: If statement for "State"

I got help from the Pro's over at Qualiteam and thanks to them this now works great.
For anyone else interested in only showing the "state" field for only the US (or you could change or add any country you want).
Xcart Version 4.1.10 - change the following two bits of code in skin1/mail/html/order_invoice.tpl

Code:
{if $_userinfo.default_fields.b_state} <tr> <td><b>{$lng.lbl_state}:</b> </td> <td>{$order.b_statename}</td> </tr> {/if}
To
Code:
{if $_userinfo.b_country eq "US"} {if $_userinfo.default_fields.b_state} <tr> <td><b>{$lng.lbl_state}:</b> </td> <td>{$order.b_statename}</td> </tr> {/if} {/if}
And
Code:
{if $_userinfo.default_fields.s_state} <tr> <td><b>{$lng.lbl_state}:</b> </td> <td>{$order.s_statename}</td> </tr> {/if}
To
Code:
{if $_userinfo.s_country eq "US"} {if $_userinfo.default_fields.s_state} <tr> <td><b>{$lng.lbl_state}:</b> </td> <td>{$order.s_statename}</td> </tr> {/if} {/if}
__________________
v4.1.10
In Dev v4.5.x


"If you don't keep an eye on your business, someone else will."
Reply With Quote