Skip to main content

How to add date/time in custom order notification

More
5 years 11 months ago #324572 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.

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #324589 by nicolas
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:
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.

More
5 years 11 months ago #324614 by onegoodlife
Hi,

Thanks, it worked.

Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.200 seconds
Powered by Kunena Forum