need2011 Posted December 23, 2022 Share Posted December 23, 2022 (edited) Hi all, I have a private site and I need to delete the password box on the guest signup and the password box on the order confirmation page. I can't find what folder and file they are in. PS 1.7.8.8 Greatly appreciate anyone that could direct me the files of both. Thanks so much. Edited December 23, 2022 by need2011 (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted December 23, 2022 Share Posted December 23, 2022 Hi ./themes/classic/assets/js/custom.js Add: $(document).ajaxStart(function() { var loginAsGuest = document.querySelector('a[aria-controls="checkout-guest-form"]'); if (typeof(loginAsGuest) != 'undefined' && loginAsGuest != null) { var passwordElem = document.getElementsByClassName('form-informations')[0]; passwordElem.style.display = 'none'; passwordElem.nextElementSibling.style.display = 'none'; } }); 1 1 Link to comment Share on other sites More sharing options...
need2011 Posted December 23, 2022 Author Share Posted December 23, 2022 Thank very much. 1 Link to comment Share on other sites More sharing options...
need2011 Posted December 23, 2022 Author Share Posted December 23, 2022 Just installed it and works perfectly. Thanks again. 1 Link to comment Share on other sites More sharing options...
ps8modules Posted December 23, 2022 Share Posted December 23, 2022 I gladly helped 😉 1 Link to comment Share on other sites More sharing options...
need2011 Posted December 23, 2022 Author Share Posted December 23, 2022 Prestafree that worked great. I can't thank you enough! I also needed to get the whole signup out of the "order confirmation" page. If you could please help me out. Thanks Link to comment Share on other sites More sharing options...
ps8modules Posted December 23, 2022 Share Posted December 23, 2022 Hi, /themes/classic/templates/checkout/order-confirmation.tpl find: {block name='customer_registration_form'} {if $customer.is_guest} <div id="registration-form" class="card"> <div class="card-block"> <h4 class="h4">{l s='Save time on your next order, sign up now' d='Shop.Theme.Checkout'}</h4> {render file='customer/_partials/customer-form.tpl' ui=$register_form} </div> </div> {/if} {/block} change to: {**block name='customer_registration_form'} {if $customer.is_guest} <div id="registration-form" class="card"> <div class="card-block"> <h4 class="h4">{l s='Save time on your next order, sign up now' d='Shop.Theme.Checkout'}</h4> {render file='customer/_partials/customer-form.tpl' ui=$register_form} </div> </div> {/if} {/block**} 2 Link to comment Share on other sites More sharing options...
need2011 Posted December 23, 2022 Author Share Posted December 23, 2022 Thank you so much! Worked perfectly. Plus I learned something ** Thanks. 1 Link to comment Share on other sites More sharing options...
ps8modules Posted December 23, 2022 Share Posted December 23, 2022 I gladly helped 😉 2 Link to comment Share on other sites More sharing options...
Mediacom87 Posted December 31, 2022 Share Posted December 31, 2022 Le 23/12/2022 à 5:31 PM, need2011 a dit : Thank you so much! Worked perfectly. Plus I learned something ** Thanks. Hi, It is not necessary to double the * https://www.smarty.net/docsv2/en/language.basic.syntax.tpl Link to comment Share on other sites More sharing options...
ps8modules Posted January 1, 2023 Share Posted January 1, 2023 Yes, one star is enough, I put two to remember 😉 As another thing you need to know, there must not be another comment in the commented section. It's just for a quick explanation for newbie programmers. BAD {*$product.name*}: {*block name='page_header_container'} {block name='page_header'} <h1 class="h1">{block name='page_title'}{*$product.name*}{/block}</h1> {/block} {/block*} OR BAD {*$product.name*}: {* {block name='page_header_container'} {block name='page_header'} <h1 class="h1">{block name='page_title'}{*$product.name*}{/block}</h1> {/block} {/block} *} GOOD: {*block name='page_header_container'} {block name='page_header'} <h1 class="h1">{block name='page_title'}{$product.name}{/block}</h1> {/block} {/block*} OR GOOD {* {block name='page_header_container'} {block name='page_header'} <h1 class="h1">{block name='page_title'}{$product.name}{/block}</h1> {/block} {/block} *} Link to comment Share on other sites More sharing options...
ivenkov Posted December 2, 2023 Share Posted December 2, 2023 Hello, I did not find a file named custom.js and created it in the specified folder, but the password field did not disappear. Can you give a little more detail on how I applied the change? This stop me to continue with next change in Order information. Thank you in advance. Link to comment Share on other sites More sharing options...
need2011 Posted December 3, 2023 Author Share Posted December 3, 2023 Ivenkov what version are you using. If you follow the instructions it works for PS 1.7.8.8. If you want I can upload or message you my .js file. I hope that this helps you. Link to comment Share on other sites More sharing options...
ivenkov Posted December 3, 2023 Share Posted December 3, 2023 Hi Need2011, The version is the same 1.7.8.8. When I read your post I try to find a file named custom.js but it not exist in pointed folder. I crate my own file (with win 10 code writer) and copy it to directory with the same rights. After that reload the server but password field still appear. Please attach your custom.js in your answer. In addition please send me full path where custom.js must be. Link to comment Share on other sites More sharing options...
ps8modules Posted December 3, 2023 Share Posted December 3, 2023 (edited) ./themes/classic/assets/js/custom.js If you are using a theme other than classic, you must use your theme's folder. Edited December 3, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
need2011 Posted December 3, 2023 Author Share Posted December 3, 2023 here is the path ./themes/classic/assets/js/custom.js Yes you create the file. But you have to save it as PLAIN TEXT use note pad in windows. this may be your problem. I will try to upload ti here if not I will message it for you. Link to comment Share on other sites More sharing options...
ivenkov Posted December 3, 2023 Share Posted December 3, 2023 Hi, Yes, I am using classic theme. The full path that I use is /var/www/html/themes/classic/assets/js/custom.js I create file with Notepad and put it in folder /var/www/html/themes/classic/assets/js/ but password field stil exist. Link to comment Share on other sites More sharing options...
need2011 Posted December 3, 2023 Author Share Posted December 3, 2023 1 hour ago, ps8moduly.cz said: ./themes/classic/assets/js/custom.js If you are using a theme other than classic, you must use your theme's folder. ps8moduly.cz just posted... Did you try this? Link to comment Share on other sites More sharing options...
ivenkov Posted December 3, 2023 Share Posted December 3, 2023 Hi, I am using clasic theme and the new file custom.js is putted in folder /var/www/html/themes/classic/assets/js/. See attached file. Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 Hi. There are other questions. 1. in the performance settings the cache was cleared and the template was recompiled 2. you use a standard order or a one page checkout 3. custom.js is loaded in your browser's inspector Link to comment Share on other sites More sharing options...
ivenkov Posted December 4, 2023 Share Posted December 4, 2023 Hi, 1. I clear cashe and force recompilation, restart server but password field still exist. 2. I am using standard order. 3. The custom.js is loaded in browser Any other suggestios are wellcome. Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 Your store is in maintenance mode, so we can't check what's wrong. Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 $(document).ajaxStart(function() { var loginAsGuest = document.querySelector('a[aria-controls="checkout-guest-form"]'); if (typeof(loginAsGuest) != 'undefined' && loginAsGuest != null) { var passwordElem = $('#field-password'); $(passwordElem).parent().parent().parent().hide(); } }); Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 You still need to hide the account creation information. So the fully functional JavaScript is: $(document).ajaxStart(function() { if ($('#checkout-guest-form').hasClass('active')) { var passwordElem = $('#field-password'); $(passwordElem).parent().parent().parent().hide(); var passwordInfo = $(passwordElem).parent().parent().parent(); $(passwordInfo).prev().hide(); } }); Link to comment Share on other sites More sharing options...
ivenkov Posted December 4, 2023 Share Posted December 4, 2023 Hi, I remove maintenance mod. Are the scripts ъоу posted above part of custom.js? Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 (edited) 1 hour ago, ivenkov said: Hi, I remove maintenance mod. Are the scripts ъоу posted above part of custom.js? Yes, sure Edited December 4, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 BAD !!! $(document).ajaxStart(function() { var loginAsGuest = document.querySelector('a[aria-controls="checkout-guest-form"]'); if (typeof(loginAsGuest) != 'undefined' && loginAsGuest != null) { var passwordElem = document.getElementsByClassName('form-informations')[0]; passwordElem.style.display = 'none'; passwordElem.nextElementSibling.style.display = 'none'; } }); $(document).ajaxStart(function() { var loginAsGuest = document.querySelector('a[aria-controls="checkout-guest-form"]'); if (typeof(loginAsGuest) != 'undefined' && loginAsGuest != null) { var passwordElem = $('#field-password'); $(passwordElem).parent().parent().parent().hide(); } }); $(document).ajaxStart(function() { if ($('#checkout-guest-form').hasClass('active')) { var passwordElem = $('#field-password'); $(passwordElem).parent().parent().parent().hide(); var passwordInfo = $(passwordElem).parent().parent().parent(); $(passwordInfo).prev().hide(); } }); GOOD: $(document).ajaxStart(function() { if ($('#checkout-guest-form').hasClass('active')) { var passwordElem = $('#field-password'); $(passwordElem).parent().parent().parent().hide(); var passwordInfo = $(passwordElem).parent().parent().parent(); $(passwordInfo).prev().hide(); } }); Link to comment Share on other sites More sharing options...
ivenkov Posted December 4, 2023 Share Posted December 4, 2023 (edited) Hi, Now the custom.js contain only last part of your post, but password stil exist. I don't understand what I'm not doing right. Edited December 4, 2023 by ivenkov (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted December 4, 2023 Share Posted December 4, 2023 (edited) You have a bad script!!! Can you copy what is not crossed out? Edited December 4, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
need2011 Posted December 21, 2023 Author Share Posted December 21, 2023 Prestashop 1.7..8.8 Is there any way do disable this page? website.com/login?create_account=1 I have redirected it in .htaccess and have changed the name in Traffic and SEO. This has not worked. I am getting so much spam I have shut down all the other signups thanks to this thread now I have been alerted that is is open and getting spamed. Thanks so much for all the help that you have given this thread. 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