Jump to content

Conditional Display Variable


cirrus

Recommended Posts

Hi I am trying to put a Conditional Display into the Invoice Created Email does anyone know what the variable is for Product Name I have tried the following

$product_service.name

$product_service_name

$service_product.name

$service_product_name

 

Not actually sure if the above variables are related to the Product Name

 

The Product Name I am trying to capture is listed

Group Name: Domains Services

Type: Other Product/Service

Product Name: Annual Domain Name Renewal

 

The conditional display I am trying to get working looks like this

{if $product_service_name eq "Annual Domain Name Renewal"} Annual Domain Name Renewal Invoice {else} Web Hosting Invoice {/if}

 

But in the email does not matter what variable I use for the Product Name the text in the email always says Web Hosting Invoice

 

Anyone got any ideas

Link to comment
Share on other sites

I have the following idea:

{$invoice_items} is array of items from invoice and should have also the product name

 

try the following code to get the array structure, then you will know how to reach the name

{$invoice_items|@print_r}

 

you will see printed array

and I guess will have to do something like this:

 

{foreach from=$invoice_items item=value}
{if $value.productname eq 'Something'}Output there something{/if}
{/foreach}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated