- Posts: 40
- Thank you received: 0
How to add date/time in custom order notification
- onegoodlife
-
Topic Author
- Offline
Less
More
5 years 11 months ago #324572
by onegoodlife
How to add date/time in custom order notification was created by onegoodlife
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20
-- PHP version -- : 7.3
Hi,
can you please tell me how do i add order date and time in customized order notification mail template? i am trying options here as you see in this screenshot, prntscr.com/uvn0rv but nowhere i find order date and time vars to select, so can you tell me how do i add them in html version of the part?
Thank you.
-- Joomla version -- : 3.9.20
-- PHP version -- : 7.3
Hi,
can you please tell me how do i add order date and time in customized order notification mail template? i am trying options here as you see in this screenshot, prntscr.com/uvn0rv but nowhere i find order date and time vars to select, so can you tell me how do i add them in html version of the part?
Thank you.
Please Log in or Create an account to join the conversation.
5 years 11 months ago - 5 years 11 months ago #324589
by nicolas
Replied by nicolas on topic How to add date/time in custom order notification
Hi,
The order creation date and time is stored in the order_created field.
So you can use {VAR:order.order_created}
However, this will output the raw date from the database, which should just be a number.
If you want a human readable date and time, you'll have to add PHP code like that:
The order creation date and time is stored in the order_created field.
So you can use {VAR:order.order_created}
However, this will output the raw date from the database, which should just be a number.
If you want a human readable date and time, you'll have to add PHP code like that:
Code:
<?php echo hikashop_getDate($data->cart->order_created, '%d %B %Y %H:%M'); ?>
Last edit: 5 years 11 months ago by nicolas.
Please Log in or Create an account to join the conversation.
- onegoodlife
-
Topic Author
- Offline
Less
More
- Posts: 40
- Thank you received: 0
5 years 11 months ago #324614
by onegoodlife
Replied by onegoodlife on topic How to add date/time in custom order notification
Hi,
Thanks, it worked.
Thank you.
Thanks, it worked.
Thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds