Jump to content

Acerca de la variable Fecha de new_order.html: aaaa/mm/dd


Recommended Posts

Buenas tardes,

 

La variable fecha en Prestashop aparece como 2012/05/10 en el correo que recibimos de new_order.html. Como puedo ponerla al revés?

 

Gracias

Prueba, en la pestaña Herramientas/Idioma y fíjate en el formato de fecha.

Link to comment
Share on other sites

No cosnigo hacer funcionar el código que muestran en el enlace. El archivo Tools.php tengo el siguiente contenido:

 

class Tools extends ToolsCore
{
public static function displayDate($date, $id_lang, $full = false, $separator = '-')
    {
			 if (!$date OR !strtotime($date))
					 return $date;
		    if (!Validate::isDate($date) OR !Validate::isBool($full))
				    die (self::displayError('Invalid date'));
			 $tmpTab = explode($separator, substr($date, 0, 10));
			 $hour = ' '.substr($date, -8);

		    $language = Language::getLanguage((int)($id_lang));
			 if ($language AND strtolower($language['iso_code']) == 'fr')
					 return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : ''));
			 else
					 return ($tmpTab[0].'-'.$tmpTab[1].'-'.$tmpTab[2].($full ? $hour : ''));
    }
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...