Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Order date format in order status emails
Author « Topic »  

EllenD
Advanced Member

United Kingdom
434 Posts

Posted - 05/06/2020 :  06:01:38  
Hi,

Just a small query here if I may please. In the order status emails, the order date gets used with %orderdate%
When that field is replaced in the email, we get the date and time like this '18th February 2020 15:15'

I have these in my includes.php (v7.2.2)

$admindateformat=2; //uk
$dateformatstr = "dS F Y";

I don't have any of the format items for 'time' but the time is still showing. How can I remove the time from the orderdate format in the status emails?

Thank you
Ellen

Vince
Administrator

42761 Posts

Posted - 05/06/2020 :  14:40:59  
Hi Ellen
I've had a look and you are correct, the time is added regardless of the date format. The date formats were added as of course, not all countries use the same format. But as there isn't any regional variation for the time it is kind of hard coded and it's never been a problem till now. Can you live with it as it is?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

EllenD
Advanced Member

United Kingdom
434 Posts

Posted - 05/07/2020 :  00:57:10  
Hi Vince

Thank you for looking into this. I'm not too bothered about formatting the time, but would like to remove it if possible. Not urgent, perhaps one for the to-do list sometime?!

Thanks
Ellen

quadrant
Ecommerce Template Guru

United Kingdom
1110 Posts

Pre-sales questions only
(More Details...)

Posted - 05/07/2020 :  01:15:01  
Hi Vince/Ellen,

If it were to be removed maybe we could have the option via an includes.php setting.

We sell products that are dispatched same day if ordered by a particular time so it’s handy to have the time appear after the date.

Regards,

David

Vince
Administrator

42761 Posts

Posted - 05/07/2020 :  01:23:49  
Hi David
I don't think we would just go removing this but maybe in the future some way to make the format more flexible. But for now Ellen if you want to remove it yourself, in incorders.php look for ...

$ose=str_replace('%orderdate%', date($dateformatstr, $orddate) . ' ' . date('H:i', $orddate), $ose);

...and remove the time bit (which is the H:i) like this...

$ose=str_replace('%orderdate%', date($dateformatstr, $orddate);

Vince


Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

quadrant
Ecommerce Template Guru

United Kingdom
1110 Posts

Pre-sales questions only
(More Details...)

Posted - 05/07/2020 :  06:27:41  
Hi Vince,

Thanks for confirming.
More flexible formats would be good.

Regards,

David

EllenD
Advanced Member

United Kingdom
434 Posts

Posted - 05/11/2020 :  01:20:57  
Hi All,

I can see the order time would be useful for some stores. Would be good to have a parameter or for it to use the settings in $dateformatstr. Or maybe have a new parameter $timeformatstr so that those with the current settings would not find the time 'disappeared'!

Thank you
Ellen
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000