using if statements in supplier notification email?

Does anyone know if this will work? I’ve played around with it, but I managed to screw up my checkout so I obviously made an error. I don’t know if this is the correct syntax, variable, etc… I am wanting to display the customer info only to one of my suppliers.

{if $product.supplier_id eq “24”}

customer info


I’m going to play around with it again but I’m hoping I can get some pointers. :cool:

Well, this time I didn’t break anything, but I only managed to hide the customer info for everyone. This is what I had in my template at /mail/addons/suppliers/invoice.tpl (changes in red)

[COLOR="Red"]{if $product.supplier_id eq "24"}[/COLOR]
{* Customer info *}
{assign var="profile_fields" value='I'|fn_get_profile_fields}
{split data=$profile_fields.C size=2 assign="contact_fields" simple=true}

{include file="profiles/profile_fields_info.tpl" fields=$contact_fields.0 title=$lang.contact_information user_data=$order_info}

{include file="profiles/profile_fields_info.tpl" fields=$contact_fields.1 user_data=$order_info}

{include file="profiles/profile_fields_info.tpl" fields=$profile_fields.S title=$lang.shipping_address user_data=$order_info}

{* /Customer info *}

:oops: I figured it out… I was trying to make it too complicated. The way to call the supplier_id is simply… $supplier_id :rolleyes:

I hope this helps some other poor soul. :smiley: