quique71186 Posted July 24, 2020 Share Posted July 24, 2020 Hola, estoy creando un modulo para guardar los códigos postales en una base de datos, el dato que quiero guardar se encuentra en /themes/default-bootstrap/address.tpl, el ID y name del campo es 'postcode', el nombre y ID del boton es ''submitAddress' y el codigo que tengo es este if (Tool::isSubmit('submitAddress')) { $postcode1 = Tools::getValue('postcode'); configuration::updateValue('LRpostalcode', $postcode1); echo'<script type="text/javascript"> alert("Tarea Guardada"); window.location.href="index.php"; </script>'; } ¿alguien sabe porque no funciona? ni siquiera me muestra el alert que puse Link to comment Share on other sites More sharing options...
gusman126 Posted July 25, 2020 Share Posted July 25, 2020 (edited) Yo utilizaría este hook "actionValidateCustomerAddressForm" https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/ actionValidateCustomerAddressForm This hook is called when a customer submit its address form Located in: /classes/form/CustomerAddressForm.php Parameters: <?php array( 'form' => (object) CustomerAddressForm ); Leeria el codigo postal y ejecutaria tu codigo Edited July 25, 2020 by gusman126 (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