Jump to content

Conditional Email by Payment Type


mediademon

Recommended Posts

Hi

 

Was just wondering if this is a useful addition to anyone's email templates?

 

{if $invoice_payment_method=='Credit Card'}
{if $client_cc_number==''}As you do not have a payment card assigned to your account, you will need to login and pay this invoice online now.
{else}If your credit card details have changed then you will need to login and pay this invoice online now.
Otherwise, payment will occur automatically on the {$invoice_date_due} from the following card:

Card Type: {$client_cc_type}
Card Number: {$client_cc_number}
Expires: {$client_cc_expiry}
{/if}
{/if}

 

First time i've used this conditional smarty stuff so i'm hoping this is the correct syntax?

Link to comment
Share on other sites

Just to let you know that the logical operator && breaks the smarty template...

 

{if $invoice_payment_method == 'Pay Online' && $client_cc_number == ''}

 

Using "and" works...

 

{if $invoice_payment_method == 'Pay Online' and $client_cc_number == ''}

 

Seems strange, && is part of the smarty syntax.

Link to comment
Share on other sites

  • 2 weeks later...

Hi

Ignore using $client_cc_number to check for the (non)existence of a card, use $client_cc_type instead.

 

$client_cc_number contains "No existing card details on record" when empty!

[color=#000000][color=#007700][font=verdana]{if $invoice_payment_method == 'Pay Online' and $client_cc_type == ''}[/font][/color][/color]
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