| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Show Field Only If Data Entered | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() We have Tax Number enabled in the User Profiles options section but would like it to only display on the invoice if a customer does indeed have a tax number. Is there a way to use an {if} statement to accomplish this?
Example for customer with a tax number, First Name: John Last Name: Doe Company: Cakes Are Us Tax Number: 1234567 Phone: 555 1212 E-Mail: john@cakesrus.com URL: cakesville.com Example for customer without a tax number, First Name: John Last Name: Doe Company: Cakes Are Us Phone: 555 1212 E-Mail: john@cakesrus.com URL: cakesville.com Below is the current {if} statement for that field. Code:
Thanks |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() try this
{if $order.tax_number ne ""} {if $_userinfo.default_fields.tax_number}{$lng.lbl_tax _number|truncate:$max_truncate:"...":true|cat:":"| string_format:$max_space}{$order.tax_number} {/if} {/if}
__________________
xcart 5.1.2 |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Quote:
Thanks Ashley, I'll give this a try. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|