JavierUpn Posted July 14, 2016 Share Posted July 14, 2016 Buenas tardes en mi país, quisiera ver si me pudieran ayudar sobre como recibir los datos por medio de ajax. Lo que quiero hacer es un cotizador de costo de envio, Es decir, al escribir un código postal en un formulario, regresar el costo de envío por medio de ajax. Aquí adjunto un mokup. Gracias y espero me puedan ayudar. Link to comment Share on other sites More sharing options...
buhoplace Posted July 16, 2016 Share Posted July 16, 2016 Tu php esta en modules/controllers/front/ajax.php ahí llamas a tu función. Devuelves la respuesta en json: die(Tools::jsonEncode(array("response" => 1,"price" => $price))); En el ajax tienes que poner el dataType en json 1 Link to comment Share on other sites More sharing options...
JavierUpn Posted July 21, 2016 Author Share Posted July 21, 2016 (edited) Buhoplace lo solucioné de otra forma no tan ortodoxa, pero igual me funcionó. Gracias por su respuesta!. Edited July 21, 2016 by IngJavier90 (see edit history) 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