CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Today's date in an email template token
Pages: [1]

Author Topic: Today's date in an email template token  (Read 2043 times)

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Today's date in an email template token
February 07, 2011, 12:07:26 pm
How do you insert today's date (at the time of online application} into an automatic email receipt/invoice template?

{$receive_date} only works when payment is received - for an receipt but an invoice should have a date also.

Am I making sense? ???
« Last Edit: February 07, 2011, 12:30:34 pm by Hans.S »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Today's date in an email template
February 07, 2011, 12:12:16 pm

check:

http://www.smarty.net/docsv2/en/language.modifier.date.format.tpl

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hans.S

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 5
Re: Today's date in an email template
February 07, 2011, 12:29:57 pm
Thanks for you quick reply.

So I put {$smarty.now|date_format} in the template and it generated today's date.

There are also options to format the date in different ways.

Again thanks so much, it was very helpfull.
« Last Edit: February 07, 2011, 12:40:58 pm by Hans.S »

nascent

  • I’m new here
  • *
  • Posts: 14
  • Karma: 3
  • CiviCRM version: 3.3
  • CMS version: Joomla 1.5
  • MySQL version: 5.0
  • PHP version: 5.2
Re: Today's date in an email template token
July 27, 2011, 05:24:44 am
Searching through the forums led me to this old thread which deals with my issue.
I'm trying to put today's date into my mail template.
Quote
So I put {$smarty.now|date_format} in the template and it generated today's date.

I tried this and unfortunately it doesn't work for me.

Various places stipulate that I should check that the line
Code: [Select]
define( 'CIVICRM_MAIL_SMARTY', 1 ); is in my civicrm.settings.php file.

My settings file already has
Code: [Select]
define( 'CIVICRM_CIVIMAIL_SMARTY', 1 ); If I change that to "CIVICRM_MAIL_SMARTY", the preview screen is completely blank.

Does anyone have any suggestions of where to look next?



Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Today's date in an email template token

This forum was archived on 2017-11-26.