Jump to content

How to edit authentication files


Jimbola

Recommended Posts

Hi all,

 

I want to edit some of the create new account, and steps files. I normally do this on localhost but to get to the screen I want I have to create a fake account, then see if the edit I made worked, but once the account is made if I then want to get back to that screen I create another account. Which seems crazy. 

 

So how can I view screens related to creating a new account without creating a new account so I can edit them?

Link to comment
Share on other sites

you have to remove $customer->add() from authController.php (controllers/front/authController.php

as far as i remember it is in if condition, so - simply remove whole if condition (then prestashop will not create an account)

or add an error code to $this->errors, then you will see error code and account will not be created

 

for exmaple, before if condition: if (!count($this->errors)) add 

$this->errors[] = Tools::displayError('TEST MODE');

Link to comment
Share on other sites

So I changes the code in the AuthController.php to

    $this->errors[] = Tools::displayError('TEST 
MODE');
    if 
(!count($this->errors))    {          else      $this->errors[] 
= Tools::displayError('An error occurred while creating your 
account.');    }

but now I just get an error (unable to load form) and it doesn't move forward to the screens I want to edit.

Link to comment
Share on other sites

this is not what you wanted?

you wanted to avoid customer registration

so with this error customer account will not be created

 

What I wanted was to be able to edit the files authentication.tpl and shopping-cart.tpl and view the changes in the browser. But so far I have been using fake accounts to get to each screen. Isn;t there like a developer mode that I can turn on that allows me to view the files in my browser without needing to register any account?

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