Jump to content

Include Auto-Renew status in domain reminder emails


gbotica

Recommended Posts

I am trying to improve the content in my domain reminder emails, and I note the existence of this template tag: {$domain_do_not_renew} -- it would be great to include this in the reminder emails (seems odd that it is not already included!)

 

How can I test the actual output of this tag in certain circumstances? For example, could I use it like this:

 

{if $domain_do_not_renew}Domain Auto-renew DISABLED{else}Domain Auto-renew ENABLED{/if}

 

Or, does this tag not output a boolean?

 

Also, the domain renewal email template contains some variations, depending on whether there is multiple or single domains due for renewal (I can't find any reference to the $expiring_domains tag any where!). How would I implement the above into the looped instances below? Would $domain_do_not_renew still be available in the loops? Would it be {$domain.domain_do_not_renew}?

 

{if $expiring_domains}
{foreach from=$expiring_domains item=domain}{$domain.name} - {$domain.nextduedate} ({$domain.days} Days)
{/foreach}
{elseif $domains}{foreach from=$domains item=domain}{$domain.name} - {$domain.nextduedate}
{/foreach}
{else}{$domain_name} - {$domain_next_due_date} ({$domain_days_until_nextdue} Days){/if}

 

Any assistance greatly appreciated.

 

- - - Updated - - -

 

Just found this thread: http://forum.whmcs.com/showthread.php?105031-Domain-Auto-renew-status

 

Looks like maybe it would be $domain.autorenew

 

Can anyone confirm whether this will work?

Link to comment
Share on other sites

I am trying to improve the content in my domain reminder emails, and I note the existence of this template tag: {$domain_do_not_renew} -- it would be great to include this in the reminder emails (seems odd that it is not already included!)

 

How can I test the actual output of this tag in certain circumstances?

Or, does this tag not output a boolean?

you could send yourself (via a test account in your WHMCS) an email from the admin area and it will show that $domain_do_not_renew is boolean - if disabled, its value is 0; if enabled, its 1... so your line would be...

 

{if $domain_do_not_renew eq 0}Domain Auto-renew DISABLED{else}Domain Auto-renew ENABLED{/if}

 

Also, the domain renewal email template contains some variations, depending on whether there is multiple or single domains due for renewal (I can't find any reference to the $expiring_domains tag any where!). How would I implement the above into the looped instances below? Would $domain_do_not_renew still be available in the loops? Would it be {$domain.domain_do_not_renew}?

http://forum.whmcs.com/showthread.php?83163-Difference-between-days_until_expiry-and-domain_days_until_expiry&p=353842#post353842

 

the first is used on the emails sent on the 11th of each month; the second is used when its triggered by the domain reminder settings in the automation settings.

 

with regards to using in the loops, untried but i'd be amazed if you couldn't use it - it should still be {$domain_do_not_renew}

 

granted, it's harder to test the automated 11th day version - but you can test it on an individual domain and it should work the same in the loops.

 

Just found this thread: http://forum.whmcs.com/showthread.php?105031-Domain-Auto-renew-status

Looks like maybe it would be $domain.autorenew

Can anyone confirm whether this will work?

it wouldn't work - you can't mix and match the variables in the client area and email templates - think of them as being totally separate beasts.

Link to comment
Share on other sites

I don't know how to send a test email for the domain renewals, I thought they could only be sent when triggered by a cron job -- how is this done?

 

  • log into the admin area.
  • select a client (ideally a test account).
  • in their profile, press the "Domains" tab.
  • choose a domain from the dropdown.
  • at the bottom of the page, there is a dropdown of domain email templates - select "Upcoming Domain Renewal Notice" and press 'Send Message'.

all being well, you should receive an email - remembering to have first edited your UDRN email template to include this variable and/or {if} statement somewhere! :idea:

Link to comment
Share on other sites

Ah! Thanks for the tip. In fact I can even just use "New Message" and then load the template and preview, without having to send the email at all.

 

I've tested it for single domains and it works, but can't see any way to test the loops. I've copied myself into the UDRN template, so I guess I'll just have to wait until one get sent to see if it works..?

 

Thanks again for your help.

Link to comment
Share on other sites

Ah! Thanks for the tip. In fact I can even just use "New Message" and then load the template and preview, without having to send the email at all.

that's true - forgot about that. :roll:

 

I've tested it for single domains and it works, but can't see any way to test the loops. I've copied myself into the UDRN template, so I guess I'll just have to wait until one get sent to see if it works..?

the way i've done that in the past is to modify the next due dates of some test domains and then wait for the next cron to run - but if you've got it working for an individual domain, then it should work in the loops too (which are effectively individual domains pulled from the array anyway).

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.

×
×
  • 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