davidddp Posted March 17, 2017 Share Posted March 17, 2017 Es posible que la referencia de los pedidos sean números y no letras? O que me generase un campo alternativo con números aleatorios. Link to comment Share on other sites More sharing options...
Sergio Ruiz Posted March 17, 2017 Share Posted March 17, 2017 Es posible que la referencia de los pedidos sean números y no letras? O que me generase un campo alternativo con números aleatorios. Mira ver la guia de Nemo que comentan aqui: https://www.prestashop.com/forums/topic/586544-changing-order-reference-to-order-id/ 1 Link to comment Share on other sites More sharing options...
davidddp Posted March 17, 2017 Author Share Posted March 17, 2017 Gracias, funciona perfectamente en PS 1.7: Modificar esta función que se encuentra en: /classes/order/Order.php public static function generateReference() { $last_id = Db::getInstance()->getValue(' SELECT MAX(id_order) FROM '._DB_PREFIX_.'orders'); return str_pad((int)$last_id + 1, 9, '000000000', STR_PAD_LEFT); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now