If Statement for Customer Name and Company Name

Highlighted
New Member
1 0 0

Hello,

I am looking for some help with some code for a tax receipt.

We currently have PDF tax receipts generate (We are a charity) that contains this coding pulled into the pdf from a customer order.

{% assign address = order['billing_address'] %} {{
address['first_name'] }} {{ address['last_name'] }}<br /> 
{{ address['address1'] }}<br />
{{ address['city'] }}<br />
{{ address['country'] }}<br />
{{ address['zip' }}

 

In some cases our donors want the receipt to be for their company name. I know that would be the following code

{{ address['company'] }}

 

I believe this is HTML but could be CSS, I really am not to sure.

 

Anyways wondering if anyone can help me out with an IF Statement so IF Company Name is present on the Billing Address I show company name instead of customer first and last name on this PDF.

Thanks in advance.

0 Likes