Jump to content

[SOLVED] How to use only guest checkout and remove create account option?


Linnet

Recommended Posts

I want to have a guest checkout as an only option to simplify my store as much as possible.

 

Can I remove the option to register and create an account from the checkout page? It would be also nice if the contact information fields (name, address, e-mail, etc.) would show in the checkout page without needing to click the "check out as guest" button.

 

I'm a beginner with Presta Shop so I appreciate clear instructions. Thank you!

Link to comment
Share on other sites

Hello,

 

I tried out editing the authentication.tpl, but it didn't make any changes for me. Maybe it is because I have the one-page-checkout enabled.

 

In /themes/mytheme/order-opc-new-account.tpl I was able to cancel out some lines to make the register and account sign in options invisble. So now I just have the link for "checkout as guest" left. I don't know how to skip the link but this is good enough. If someone knows how to skip the link then that would be great!

Link to comment
Share on other sites

Below is still what I cancelled out in the order-opc-new-account.tpl file. If I cancelled more, the page went crazy in Firefox browser. Now a little frame remains though and I don't know if this will look ok in all browsers.

 

line 49:

<h3 id="new_account_title">{l s='New Customer'}</h3>

 

line 24:

<form action="{$link->getPageLink('authentication.php', true)}?back=order-opc.php" method="post" id="login_form" class="std">

 

line 26:

   <h3>{l s='Already registered?'} <a href="#" id="openLoginFormBlock">{l s='Click here'}</a></h3>

Link to comment
Share on other sites

  • 1 year later...

Maybe somebody is still looking for it so...

 

To enable guest account form without clicking a button "Checkout as guest" go to the 404 line in themes\default\js\order-opc.js

 

there is:

$('#opc_account_form').hide();

 

should be:

$('#opc_account_form').show();

 

Now, you can remove the "Checkout as guest" button in order-opc-new-account.tpl

  • Like 4
Link to comment
Share on other sites

  • 8 months later...

Maybe somebody is still looking for it so...

 

To enable guest account form without clicking a button "Checkout as guest" go to the 404 line in themes\default\js\order-opc.js

 

there is:

$('#opc_account_form').hide();

 

should be:

$('#opc_account_form').show();

 

Now, you can remove the "Checkout as guest" button in order-opc-new-account.tpl

I am using Prestashop 1.5.4.1 and it did not work :( any suggestions?

Link to comment
Share on other sites

Instead of showing the instant checkout (for quests who will not create an account), it now only shows guests who will create an account.

 

you are right

 

try to comment out lines from 429 till 453 inclusive

 

 

so the code there will look like:

 

/*/ GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT */
if ((!isLogged) || (isGuest))
{
 if (guestCheckoutEnabled && !isLogged)
 {
 /* $('#opc_account_choice').show();
  $('#opc_account_form, #opc_invoice_address').hide();

  $('#opc_createAccount').click(function() {
   $('.is_customer_param').show();
   $('#opc_account_form').slideDown('slow');
   $('#is_new_customer').val('1');
   $('#opc_account_choice, #opc_invoice_address').hide();
   updateState();
   updateNeedIDNumber();
   updateZipCode();
  });
  $('#opc_guestCheckout').click(function() {
   $('.is_customer_param').hide();
   $('#opc_account_form').slideDown('slow');
   $('#is_new_customer').val('0');
   $('#opc_account_choice, #opc_invoice_address').hide();
   $('#new_account_title').html(txtInstantCheckout);
   updateState();
   updateNeedIDNumber();
   updateZipCode();
  });
 }
 else if (isGuest)
 { */
  $('.is_customer_param').hide();
  $('#opc_account_form').show('slow');
  $('#is_new_customer').val('0');
  $('#opc_account_choice, #opc_invoice_address').hide();
  $('#new_account_title').html(txtInstantCheckout);
  updateState();
  updateNeedIDNumber();
  updateZipCode();
 }
 else
 {
  $('#opc_account_choice').hide();
  $('#is_new_customer').val('1');
  $('.is_customer_param, #opc_account_form').show();
  $('#opc_invoice_address').hide();
  updateState();
  updateNeedIDNumber();
  updateZipCode();
 }

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
  • 2 months later...

Note: Doing a search of indexed files on an operating system makes finding and removing things inside web files easy.

 

For commenting out undesirable things in .tpl files like "order-opc-new-account.tpl" use {* ...*} for commenting out things. Not /* ...*/.

 

Take a look at these files when trying things out:

 

authentication.tpl

authentication-choice.tpl

order-opc-new-account.tpl

Link to comment
Share on other sites

  • 8 months later...

We are running PS 1.4.8 and the above works splendid as long as js is running. However, lately due to mobile devises etc we see increasing traffic with js disabled.

 

With js disabled PS by default jumps to "guests who will create an account" instead of desired "guest checkout without account".

 

Any ides on how to get directly to "guest checkout without account" even with js disabled in web browser.

Thanks in advance

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...