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)
-   -   Address 2 on Invoice (https://forum.x-cart.com/showthread.php?t=48427)

info@mea.li 07-03-2009 04:57 AM

Address 2 on Invoice
 
1 Attachment(s)
Hi together

I did customize my invoice a lil bit so it fits my needs (see attached printscreen). There is now only one problem with {$order.s_address_2}.

Now there is an empty line on the invoice if ther is no address-2. How can i edit the template that this empty line is gone if there is none address-2 and only shows if there is a address-2?

See here code for this address:

{if $_userinfo.default_fields.title}
<strong>{$order.title}</strong>
{/if}<br />
{if $_userinfo.default_fields.lastname}
{if $is_nomail eq 'Y'}{/if}<strong>{$order.lastname} </strong>{/if}
{if $_userinfo.default_fields.firstname}
{if $is_nomail ne 'Y'}{/if}<strong>{$order.firstname}</strong>
{/if}<br />
{if $_userinfo.default_fields.s_address}
<strong>{$order.s_address}<br />{$order.s_address_2}</strong>
{/if}<br />
{if $_userinfo.default_fields.s_zipcode}
<strong>{$order.s_zipcode} </strong>{/if}
{if $_userinfo.default_fields.s_city}
<strong>{$order.s_city}</strong>
{/if}<br />
{if $_userinfo.default_fields.b_country}
<strong>{$order.b_countryname}</strong>
{/if}<br />

Thanks for your replys.

Regards
Manuel

pauldodman 07-03-2009 05:03 AM

Re: Address 2 on Invoice
 
Try this:

{if $order.s_address_2 ne ""}{$order.s_address_2}{/if}

That should show the line only if there is a value.

info@mea.li 07-03-2009 05:29 AM

Re: Address 2 on Invoice
 
it's working. thanks a lot paul

regards
manuel


All times are GMT -8. The time now is 04:35 AM.

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