Help to change Date Format on WHMCS Smarty Template
$10-30 USD
Closed
Posted over 7 years ago
$10-30 USD
Paid on delivery
I need a coder with experience in WHMCS and smarty templates, to help me with a simple task.
I am trying to change the Date format on the templates according, according to client country.
I was already able to do it for the variables where there is just a date (day, month, year), for example in the file “[login to view URL]”.
But I am not able to make it work for the variables where there is a date and a time, for example in the file “[login to view URL]”.
1. What I have already working is this:
==============================
On the file “[login to view URL]”, I have insert these lines:
{if $[login to view URL] eq " United States "}
{assign var="myDateFormat" value="%m/%d/%Y"}
{else}
{assign var="myDateFormat" value="%d/%m/%Y"}
{/if}
Then on every date variable I have added “|date_format:$myDateFormat”, like for example:
{$datedue|date_format:$myDateFormat}
And that is working perfectly.
2. What I have not working yet is this:
=============================
On the file “[login to view URL]”, I have inserted these lines:
{if $[login to view URL] eq " United States "}
{assign var="myDateFormat" value="%m/%d/%Y - %H:%M"}
{else}
{assign var="myDateFormat" value="%d/%m/%Y - %H:%M"}
{/if}
Then on the variables, I set for example:
{$date|date_format:$myDateFormat}
But this line, instead of showing the value of the variable $date in the required format, for some strange reason it shows the current date and time, when It should display for example when the ticket was created.
Dear Employer,I am Software engineer in China.
I’m interested in the project you recently posted.
I'm a certificated freelancer with over 600 good reviews from clients.
I have experienced knowledge in every part of Web development.
I never disappoint my clients and I’m able to lead your project to success and
troubleshoot problems.
I am LAMP & MEAN stack expert and have much knowledge in codeigniter Laravel
cakePHP, symfony ,YII and CMS(joomla, wordpress).
I am sure these will reflect in my past results.
I’m very excited to assist you in making your position successful
please feel free to contact me directly to discuss this position further.
Hello sir, Hope you doing well, i read your project description so pls come technical
discussion then we understand n negotiate cost, timeline then we move proceed further ,
also i show my past work when we discuss..
thanks.
We have read your requirements on your project & we are sure that we can accomplish this project. We have completed over 20 exams in Freelancer to prove our skills. You can see that we have excelled to the top with the grades. Kindly browse our portfolio to know us better.
Our Profile: www.freelancer.com/u/websitepro.html
Regarding your project: We do have few questions on your project. It would be great if you can come over chat to clear our doubts. We will be ready to start work on your project within 2 days.