Osclass Support Forums
General osclass questions => General discussion => Topic started by: mwindey on September 20, 2022, 04:37:40 PM
-
I was looking on the forum but couldn't find anything that matches the question so here i go.
When user receives mail to inform them there item expires then expire date is pronounced as yy/mm/dd 00:00:00
It uses ITEM_EXPIRATION_DATE from dt_expiration in oc_includes/osclass/emails.php. Is there a way to change date to dd/mm/yy ?
Normally strtotime but i don't know where to change it....
Thanks
-
@mwindey
Put it into date function:
date('Y-m-d', strtotime(...some time string ...));
-
@MB Themes,
Thanks but looks like i am doing something wrong (again) :-\
Original code is:
$words[] = array (
$aItem['s_contact_name'],
$aItem['s_title'],
$itemId,
$aItem['dt_expiration'],
osc_item_url(),
$itemURL,
$aItem['s_contact_name'],
$aItem['s_contact_email'],
$aItem['s_contact_name'],
$aItem['s_contact_email']
);
Changed it to:
$words[] = array (
$aItem['s_contact_name'],
$aItem['s_title'],
$itemId,
osc_item_url(),
$itemURL,
$aItem['s_contact_name'],
$aItem['s_contact_email'],
$aItem['s_contact_name'],
$aItem['s_contact_email'],
date('d-m-Y', strtotime($aItem['dt_expiration']))
);
ALSO to:
$words[] = array (
$aItem['s_contact_name'],
$aItem['s_title'],
$itemId,
$aItem (date('d-m-Y', strtotime(['dt_expiration']))),
osc_item_url(),
$itemURL,
$aItem['s_contact_name'],
$aItem['s_contact_email'],
$aItem['s_contact_name'],
$aItem['s_contact_email']
);
But seems like mail is not sended anymore...
-
date('Y-m-d', strtotime($aItem['dt_expiration']))
-
Thanks ;)
The ; is too much in that place because it throws error 500 then. There is already a closing tag ); at the end of the array. For now i have to wait till the first email comes in... ;D
-
Yes correct