ErikSebastia2 Posted May 10, 2012 Share Posted May 10, 2012 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 Link to comment Share on other sites More sharing options...
nadie Posted May 10, 2012 Share Posted May 10, 2012 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 More sharing options...
ErikSebastia2 Posted May 10, 2012 Author Share Posted May 10, 2012 Hola, no encuentro la opción de Formato de Fecha. Adjunto captura, gracias. Link to comment Share on other sites More sharing options...
nadie Posted May 10, 2012 Share Posted May 10, 2012 Hola, no encuentro la opción de Formato de Fecha. Adjunto captura, gracias. Que versión exacta tienes de prestashop? Link to comment Share on other sites More sharing options...
ErikSebastia2 Posted May 10, 2012 Author Share Posted May 10, 2012 PrestaShop™ 1.4.4.0 Link to comment Share on other sites More sharing options...
nadie Posted May 10, 2012 Share Posted May 10, 2012 PrestaShop™ 1.4.4.0 Pues revisa este enlace: http://www.prestashop.com/forums/index.php?/topic/130336-changing-date-format/page__view__findpost__p__636739 Link to comment Share on other sites More sharing options...
ErikSebastia2 Posted May 11, 2012 Author Share Posted May 11, 2012 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 More sharing options...
Recommended Posts