Stiven Gallardo Posted August 16, 2020 Share Posted August 16, 2020 Excuse me for my English. Good evening, could someone help me with something? I want to add a new checkbox in the Payment section in the payment part. I would like to know how to add it and furthermore in which php should I check if the checkbox was selected? Link to comment Share on other sites More sharing options...
Daresh Posted August 16, 2020 Share Posted August 16, 2020 Do you want it to be stored somewhere? I mean the information about the customer checked it or not? Or do you only want another checkbox that is required to proceed the order? Link to comment Share on other sites More sharing options...
Stiven Gallardo Posted August 16, 2020 Author Share Posted August 16, 2020 8 hours ago, Daresh said: Do you want it to be stored somewhere? I mean the information about the customer checked it or not? Or do you only want another checkbox that is required to proceed the order? I just want to put another checkbox to continue the process and, of course, that at the time of submitting the form, check in a php if the box was selected to execute a function. Link to comment Share on other sites More sharing options...
Daresh Posted August 16, 2020 Share Posted August 16, 2020 And what do you want to do in that function, executed in PHP at the time of submitting the form? Link to comment Share on other sites More sharing options...
Stiven Gallardo Posted August 16, 2020 Author Share Posted August 16, 2020 2 minutes ago, Daresh said: ¿Y qué quieres hacer en esa función, ejecutada en PHP al momento de enviar el formulario? Yes, that a function is executed in the php at the time of submitting the form, for that reason I look for in which php could validate if the checkbox was selected, it is to add the box in the payment section. Yes, that a function is executed in the php at the time of submitting the form, for that reason I look for in which php could validate if the checkbox was selected, it is to add the box in the payment section, something similar as is in the image Link to comment Share on other sites More sharing options...
Daresh Posted August 16, 2020 Share Posted August 16, 2020 But to make sure the checkbox is checked you don't need any additional PHP function to validate it, you just need to place a required checkbox in the form. Prestashop 1.7 has a new hook called TermsAndConditions, to which you can add your own checkboxes with some simple module, and those checkboxes will be required to proceed. I'm attaching you such a module to this post, but it has no configuration, you need to edit it's PHP code to add your own text for the terms. gmterms.zip 1 1 Link to comment Share on other sites More sharing options...
Stiven Gallardo Posted August 16, 2020 Author Share Posted August 16, 2020 2 minutes ago, Daresh said: Pero para asegurarse de que la casilla de verificación esté marcada, no necesita ninguna función PHP adicional para validarla, solo necesita colocar una casilla de verificación requerida en el formulario. Prestashop 1.7 tiene un nuevo enlace llamado TermsAndConditions, al que puede agregar sus propias casillas de verificación con un módulo simple, y esas casillas de verificación serán necesarias para continuar. Le adjunto un módulo de este tipo a esta publicación, pero no tiene configuración, debe editar su código PHP para agregar su propio texto para los términos. gmterms.zip 6.29 kB · 0 descargas The reason I want to validate in PHP, is because from there I am looking to execute some functions Link to comment Share on other sites More sharing options...
Daresh Posted August 16, 2020 Share Posted August 16, 2020 I see, so it will be more complicated to develop. Link to comment Share on other sites More sharing options...
Stiven Gallardo Posted August 16, 2020 Author Share Posted August 16, 2020 55 minutes ago, Daresh said: Ya veo, entonces será más complicado de desarrollar. I think so, could you help me a bit? Please Link to comment Share on other sites More sharing options...
YoJoe Posted February 9, 2022 Share Posted February 9, 2022 (edited) On 8/16/2020 at 6:32 PM, Daresh said: I'm attaching you such a module to this post, but it has no configuration, you need to edit it's PHP code to add your own text for the terms. Your simple module works perfectly fine. I wanted to add a custom text block to carrier /templates/checkout/_partials/steps/shipping.tpl but I thought that using hookDisplayAfterCarrier or hookDisplayBeforeCarrier would be simpler, as I could grab a custom html widget to have multilanguage managed text and insert above/below carrier info in checkout process. But after adding proper installation and trying to show custom text within function public function hookDisplayAfterCarrier() { return "customtext"; } I don't get any text in carrier information window I'm not sure if I use proper hook, nor if I'm even able to simply insert a text using such hook? Or should I prepare a view template file in this module? Could you give me a hand with this? edit: dropped trying to hook text within this module, and stay with using only html widget Edited February 10, 2022 by YoJoe (see edit history) Link to comment Share on other sites More sharing options...
iMillenium Posted March 4, 2022 Share Posted March 4, 2022 Can someone help me to move the newsletter subscription checkbox here? I want the checkbox to appear just below Terms and Conditions. Link to comment Share on other sites More sharing options...
SliderFlash Posted January 4, 2023 Share Posted January 4, 2023 Am 4.3.2022 um 12:46 PM schrieb iMillenium: Can someone help me to move the newsletter subscription checkbox here? I want the checkbox to appear just below Terms and Conditions. https://github.com/PrestaShop/psgdpr Link to comment Share on other sites More sharing options...
El Patron Posted January 4, 2023 Share Posted January 4, 2023 16 minutes ago, SliderFlash said: https://github.com/PrestaShop/psgdpr I recommend removing toc, nobody does that unless they shippng hazaradous materials, make sure to review best in class ecommerce systems, none of toc. newsletters the same.... at checkout only have what is needed to checkout, don't put 'additional' clicks....this will improve your click through rate.. your welcome 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