Jump to content

Delete Password Box


need2011

Recommended Posts

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.

passwordDelete.png

Edited by need2011 (see edit history)
Link to comment
Share on other sites

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';
    } 
});

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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**}

 

  • Like 2
Link to comment
Share on other sites

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

  • 11 months later...

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

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

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

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

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

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

  • 3 weeks later...

 

 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...