Jump to content

Disable user account registration


flim
 Share

Recommended Posts

edit authentication.tpl file located in your theme directory.

remove field with "reigster" form. (it's better to comment it our than removing)

I see. Thank you.

Share this post


Link to post
Share on other sites

  • 1 year later...

hello

if these theme uses different templates your change will not affect second store.

if you use the same themes - you will have to duplicate one, and based on this duplicate create separate theme.

Share this post


Link to post
Share on other sites

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

HOLA,

 

Estoy intentando realizar los mismo de poder quitar del thema de prestashop el formulario de crear una cuenta en la versión de prestashop 1.6.1.4 pero no me deja incluso configurando authentication.tpl y comentando la parte que en un post arriba dentro del link que mencionan :(.

 

Aguien podria ayudarme?

 

english

 

HEY THERE,

I'm trying to do the same to remove the thema prestashop form to create an account in version 1.6.1.4 of prestashop but will not let me even setting authentication.tpl and commenting on the party in a top post in the link they mention: (.

Aguiar could help me?

Share this post


Link to post
Share on other sites

HOLA DE NUEVO,

 

Después de estar buscando la solución, un compañero de estudio y yo encontramos que para que se haga efectiva la solución del post #6, hay que tambien descativar la función de caché que esta en Parametros Avanzados/Rendimiento o bien escoger la alternativa de en medio de las 3 que ofrece para utilizar el caché esto es para la versión de prestashop 1.6.4.1, desconosco si para el resto de versiones anteriores sea igual.. GRACIAS A LA PERSONA QUE PROPORCIONÓ LA SOLUCION.

 

HELLO AGAIN,

After being looking for the solution, a study partner and I found that the solution becomes effective post # 6, we must also descativar caching this in Advanced Settings / Performance or choose among alternative of the 3 offered to use the cache that is for version 1.6.4.1 of prestashop, desconosco if for the rest of previous versions is the same .. thank the person who provided the solution.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

edit authentication.tpl file located in your theme directory.

remove field with "reigster" form. (it's better to comment it our than removing)

 

This soulution only HIDES the registration form. You can still register, by sending a POST request to the server (for example, using postman plugin for Chrome).

So don't be suprised, if somebody still registers after this change.

 

I'm new to prestashop, but in my opinion you should at least also edit controllers/front/AuthController.php, and comment-out these three lines:

 
if (Tools::isSubmit('SubmitCreate')) {
    $this->processSubmitCreate();
}
 
to disable registration on server side.

Share this post


Link to post
Share on other sites

  • 3 months later...

Hello, I have two stores. Am I able to disable the registration for one of those stores or if I make the changes above it will affect all stores?

 

Ta

G

 

 

hello

if these theme uses different templates your change will not affect second store.

if you use the same themes - you will have to duplicate one, and based on this duplicate create separate theme.

 

I just encountered the same problem.

What you have to do is:

create (or edit)

/override/classes/controller/FrontController.php

 

add

<?php

class FrontController extends FrontControllerCore
{

 public function initContent()
 {
   $this->context->smarty->assign(array(
	'store_id' => $this->context->shop->id, // Shop ID
   ));
 }
}

Then in /themes/mytheme/authentication.tpl

make sure you put the "Create account" form inside an if statement. for example if you want store_id=1 to create accounts

{if $store_id==1}
  form to create account
{/if}

Share this post


Link to post
Share on other sites

  • 1 month later...

edit authentication.tpl file located in your theme directory.

remove field with "reigster" form. (it's better to comment it our than removing)

Hi, I've done that and it works perfectly.

But I would like at the place where the registration form, put an image. How can I do it?

Share this post


Link to post
Share on other sites

  • 2 years later...
On 4/22/2014 at 12:21 PM, vekia said:

edit authentication.tpl file located in your theme directory.

remove field with "reigster" form. (it's better to comment it our than removing)

Hello, i`ve done this and now register is unavaible from Authentication button, but, if i come as guess on website and then i want to make a quick order i still have the option to create an account. How can i remove this posibility?

 

 

I use prestashop 1.6, this is website if u wanna check-out https://genti-de-marca.ro/quick-order 

Thank you!

cont.png

Share this post


Link to post
Share on other sites

For the part you have marked you need to modify also the order-opc-new-account.tpl or if you use the eu legal style it would be the order-opc-new-account-advanced.tpl

Do you want to get rid of registered customers at all and only provide guest check out? If so you should also get rid of the "Autentificare" link on the upper right in your shop.

I have changed my OPC to only guest checkout and show the form to enter the address from the instant. To do so you have also to change the order-opc.js file.

Share this post


Link to post
Share on other sites

7 hours ago, NSN said:

For the part you have marked you need to modify also the order-opc-new-account.tpl or if you use the eu legal style it would be the order-opc-new-account-advanced.tpl

Do you want to get rid of registered customers at all and only provide guest check out? If so you should also get rid of the "Autentificare" link on the upper right in your shop.

I have changed my OPC to only guest checkout and show the form to enter the address from the instant. To do so you have also to change the order-opc.js file.

can u, please, tell me what code i have to edit exactly?

Share this post


Link to post
Share on other sites

When I'm back at the desk I will check what I've changed and let you know.

Can you tell me what you need? The modification of the order-opc-new-account.tpl or the hole mod for showing the guest checkout form by default on the checkout page?

Share this post


Link to post
Share on other sites

better  tell me hole procces.

 

I`ve already done something but now i want to know how to show guest checkout by default.

 

Thank you :) 

 

 

Later edit: For now i force costumers to select guest checkout, but is there a posibility to set is at default (no click on botton needed)?

How to get rid of "Autentificare" button from top right side of my page? What file i need to edit?

 

And maybe it`s posible to remove email - required field?

Thanks.

cont2.jpg

Edited by Adrian (see edit history)

Share this post


Link to post
Share on other sites

To get rid of "Completeaza datele de livrare" put the following code in the order-opc-new-account.tpl between {*    *}

Around line 9 you see this code:

						<p class="title_block">{l s='Instant Checkout'}</p>
						<p class="opc-button">
							<button type="submit" class="btn btn-default button button-medium exclusive" id="opc_guestCheckout"><span>{l s='Guest checkout'}</span></button>}
						</p>

 

To display the form there is a small change at the beginning of the order-opc.js

Original:

$(document).ready(function(){
	// GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT
	if ((typeof isLogged == 'undefined' || !isLogged) || (typeof isGuest !== 'undefined' && isGuest))
	{
		if (guestCheckoutEnabled && !isLogged && !isGuest)
		{
			$('#opc_account_choice').show();
			$('#opc_account_form, #opc_invoice_address').hide();

New:

$(document).ready(function(){
	// GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT
	if ((typeof isLogged == 'undefined' || !isLogged) || (typeof isGuest !== 'undefined' && isGuest))
	{
		if (guestCheckoutEnabled && !isLogged && !isGuest)
		{
			$('#opc_account_choice').show();
			$('#opc_invoice_address').hide();

 

 

 

 

Share this post


Link to post
Share on other sites

4 hours ago, NSN said:

When I'm back at the desk I will check what I've changed and let you know.

Can you tell me what you need? The modification of the order-opc-new-account.tpl or the hole mod for showing the guest checkout form by default on the checkout page?

Ì`ve made the modification but the result is: *get rid of button but the guest check-out dose not apear...

 

Thank you for all directions, is there any suplimentar change that i shoul make?

Share this post


Link to post
Share on other sites

I made several changes in the file according to my needs. So I tried to figure out what has to be done in your case. I will check my the files again and see what I missed to write.
BTW, did you clear the cache and compiled the template new?

p.s. For the upper right " Autentificare " you can deactivate the module "blockuserinfo" in the admin.

 

Share this post


Link to post
Share on other sites

Yes, i had clear caches(smartly) and i get rid of button Autentificare from the code (nvs i remember was the name of the file).

Everithing is good, excepted the mail services (dose not send mails to costumers and to owner of the site) i don`t know what to do, i`ve tried different settings but nothing.

Prestashop has sent about 10 mails(only in spam) and now i do not recive nothing when i make a new command (mail alerts is installed and configurated)

Share this post


Link to post
Share on other sites

Sorry for my english..

No, i mean that if i delete the last button(check-out button) the check-out guest form dose not appear.

Another problem is the email(i had this problem for about 1 month): The prestashop dose not send mails to costumers or owner of site (with orders) and i don`t know what to do. Emails alert is installed and configurated. -> it was a period when it works, but for a short time (2 days) and all arrived mails whas delivered to spam... X(

Do you know any solutions?

Thank you! - (i have to give you some beers for all info`s that u gaved me)

Share this post


Link to post
Share on other sites

No worries about your English. I know how difficult it can be to express your thoughts in English (also not my native language)

As I mentioned before, when I changed the OPC I made some other changes too, like changing the design and get rid of the shipping part.
My checkout looks like the following:
2006821039_CurrentOPC.thumb.png.91350a7d0367d4f921bb6b1c31b190ba.png

For checking the exact steps I would need more time which I, unfortunately, hardly have at the moment but I attached all the files I changed so you can use them as a guide.
OPC-2-Column.zip

As for the mail problem I would like you to open a new topic. First, mixing problems in one topic is confusing, second, I'm not sure if I can help and third, other people that can help will see your request for help better.

Share this post


Link to post
Share on other sites

  • 2 months later...

Nice work NSN! This post has me thinking now. I am having a User Registration/Spam problem. They enter the email they want to spam in the registration process. Then on the next page under First Name Field: Some crap like "Jan And Jen Waiting" then under the Last Name Field: "They put a Porn Site Link with a tracking code behind the url aka .com/fke6u.

 

I just can't win!

Share this post


Link to post
Share on other sites

@Billy I have the same issue since yesterday. From the few time I spent I saw that the attacker can go directly to the authentication page

https://your.site/authentication?create_account=1

I also found these articles on how to integrate recaptcha but didn't have the time to work on the authentication instead of contact.

https://www.prestashop.com/forums/topic/609900-spammer-bypasses-contact-form-captcha-no-effect/?tab=comments#comment-2557188

http://kris.talkplus.org/2017/how-to-integrate-recaptcha-in-prestashop-in-3-step/

 

Will do that tomorrow, but if you succeed this today send a message to verify.

 

19 hours ago, Billy said:

Nice work NSN! This post has me thinking now. I am having a User Registration/Spam problem. They enter the email they want to spam in the registration process. Then on the next page under First Name Field: Some crap like "Jan And Jen Waiting" then under the Last Name Field: "They put a Porn Site Link with a tracking code behind the url aka .com/fke6u.

 

I just can't win!

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More