turner2f Posted December 20, 2016 Report Posted December 20, 2016 How do we change the date stamp format in email templates ? We took look in the manual and in the forums and found ...https://docs.blesta.com/display/user/Order+SystemCurrently it is set to .. {invoice.date_due} The UTC datetime stamp of the invoice due date Formatted as "YYYY-MM-DD HH:MM:SS" {invoice.date_billed} The UTC datetime stamp of the invoice bill date Formatted as "YYYY-MM-DD HH:MM:SS" Which displays something like... 2016-12-21 05:00:00 ===============================1) - Exactly where and how do we change this format so that it is more clearly read in a format familiar to our clients ?We would like the format to look something like... MM-DD-YYYY HH:MM:SS So that the output looks like ... 12-21-2016 at 5:00 PM ===============================2) - Would changing this affect any of the "Automation" functions ? Quote
0 Michael Posted December 20, 2016 Report Posted December 20, 2016 Try: {invoice.date_due_formatted} not sure about the other you could try {invoice.date_billed_formatted} Quote
0 turner2f Posted December 20, 2016 Author Report Posted December 20, 2016 Used both of those tags and they came out blank on the " Invoice Delivery (Unpaid) " email template . 1) - Is there a setting within the admin panel that I need to look at ? 2) - Or will these tags only work in a particular email template ? Quote
0 turner2f Posted December 20, 2016 Author Report Posted December 20, 2016 {invoice.date_due_formatted} Only seems to work in the following templates: Auto-Debit Pending Invoice Notice (1st) Invoice Notice (2nd) Invoice Notice (3rd) ==================== Is there a way to get this tag to work with the " Invoice Delivery (Unpaid) " email template ? Quote
0 Paul Posted December 21, 2016 Report Posted December 21, 2016 https://docs.blesta.com/display/user/Customizing+Emails#CustomizingEmails-SupportedFilters for date I think you want to follow this https://github.com/speedmax/h2o-php/wiki/Built-in-filters Quote date syntax: date(format=“Y M d”) Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given. where format is the same as PHP date() function http://www.php.net/date Quote
0 turner2f Posted December 21, 2016 Author Report Posted December 21, 2016 We are aware of the date format. What we are asking about is concerning the following tag ... {invoice.date_due_formatted} This tag only seems to work in the following templates: Auto-Debit Pending Invoice Notice (1st) Invoice Notice (2nd) Invoice Notice (3rd) ==================== Is there a way to get this tag to work with the " Invoice Delivery (Unpaid) " email template ? Quote
0 Paul Posted December 21, 2016 Report Posted December 21, 2016 16 hours ago, turner2f said: We are aware of the date format. What we are asking about is concerning the following tag ... {invoice.date_due_formatted} This tag only seems to work in the following templates: Auto-Debit Pending Invoice Notice (1st) Invoice Notice (2nd) Invoice Notice (3rd) ==================== Is there a way to get this tag to work with the " Invoice Delivery (Unpaid) " email template ? No. You can use the date filter. Quote
0 turner2f Posted December 21, 2016 Author Report Posted December 21, 2016 We might know what you mean. But could you direct us to where the "Date Filter" is ( or what it is ) so we can verify ? Quote
0 Paul Posted December 21, 2016 Report Posted December 21, 2016 11 minutes ago, turner2f said: We might know what you mean. But could you direct us to where the "Date Filter" is ( or what it is ) so we can verify ? I already did, Quote
0 turner2f Posted December 21, 2016 Author Report Posted December 21, 2016 Okeey. Under Settings - - > general - - > localization our settings are.... Date Format : M d, Y Date Time Format : M d, Y g:i:s A ================== Is this the AREA you are referring to implement this " Date Filter " ? If yes, it did not work. ================== 1) - So just curious to know if you will be making the {invoice.date_due_formatted} work with the " Invoice Delivery (Unpaid) " email template ?2) - Or is this "Date Filter" somewhere within the Blesta code that has to be modified, if yes, exactly where ? And what would the modified code look like ? Quote
0 Paul Posted December 21, 2016 Report Posted December 21, 2016 The date filter is a filter that can be added to the date tag inside the email template per the docs. So, you'd probably want something like: {invoice.date_due | date "Y M d"} Replacing the "Y M d" with the date format you want from http://www.php.net/date Quote
Question
turner2f
How do we change the date stamp format in email templates ?
We took look in the manual and in the forums and found ...
https://docs.blesta.com/display/user/Order+System
Currently it is set to ..
Which displays something like...
2016-12-21 05:00:00
===============================
1) - Exactly where and how do we change this format so that it is more clearly read in a format familiar to our clients ?
We would like the format to look something like...
MM-DD-YYYY HH:MM:SS
So that the output looks like ...
12-21-2016 at 5:00 PM
===============================
2) - Would changing this affect any of the "Automation" functions ?
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.