Jump to content

deleting php files


Recommended Posts

Good morning everyone,

 

It's my first time using PrestaShop and I have to say that it is quite useful!

 

Yet I have a question. I don't want to sell my product nor do I want to have any members, nor do I want people do sign in which is why I deleted add-ons which created a block to let people log in or access their account. Yet by clicking on the sitmap there is a link to log in and sign in which means that there is php files to do so.

 

Looking at the home directory of prestashop I see many php files like order-follow or discount.

I'd like to delete them but I would have a hard time looking at every file in order to know if they point to one of the files I want to delete.

And even if I manage to do so, if I upgrade my prestashop to a newer version, these files will once again be created is that right?

So shall I let them be, delete them, or just look through every file in order to delete each time they refer to one of these "useless" (for my websote) files?

 

Thanks for helping me

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

I am relatively new, so I wouldn't be comfortable deleting any of the files.

 

To change the display of the sitemap, I believe all you need to do is edit the sitemap.tpl (template file) in your theme directory.

 

if you are using the default theme, it is found in themes/prestashop/sitemap.tpl

 

(.tpl files are like a reduced version of PHP that get run through the Smarty template engine, so if you are comfortable with HTML and PHP you should have no trouble editing it.)

 

---------------------------------------

 

if you are using the default theme, I do recommend, though, copying the theme to a new directory (i.e. copy themes/prestashop to themes/{new_theme_name}) and making the changes there, then using the prestashop back office to switch to the new theme: click on Preferences and them click Appearance, scroll down to the available themes.

 

The point of this is so that if you upgrade prestashop in the future, your changes in the default theme are not reverted back to the default code.

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

Thank you for answering fbas!

The fact is that people will still be able to log in/sign in if they write the url by themselves. Let's say that I don't delete the files but don't write any link to reach the sign in page.

 

The user will just have to manually enter the url link : mywebsite/signIn.php and he will be shown the page which is why I wanted to delete the php files.

Link to comment
Share on other sites

fist, you should just consider putting your shop into catalog mode.

 

disable your blockuserinfo module from your back office

 

then rather than deleting files, modify your controllers/Authcontroller.php

find this line:

  $customer->active = 1;

 

and change it to:

  $customer->active = 0;

 

so now even if they register, they will not be able to sign in unless you enable them from back office-->customers tab.

  • Like 1
Link to comment
Share on other sites

hello elpatron, thank you for answering.

I've already put it into catalog mode but I could sign in/log in by writting the good url.

Even though they wouldn't be able to buy or do anything I thought that letting them signing in or logging in for nuts wasn't professional which is why I wanted to delete it.

I'll try to alter Authcontroller.php

Thank you for helping me!

 

EDIT

it doesn"t change anything we can still access the authentification by by browsing to "myprestashop/authentication.php?back=my-account.php".

It's not like it's really bothersome but it's doesn't give a "professional vibe".

 

thanks for your help

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

Hi locean67.

 

I think you can easily solve your problem by "hidding" "My account" or any other page listed in BO -> Preferences - SEO & URLs. I'd sugest you edit my-account.php, change "Rewritten URL" to something even you will never remember (something like... y7G2b0D1z4K)... This way nobody will find the My Account url and the usual "your-shop.com/my-account.php" will not work and will show a 404 page.

I wanted to remove Sitemap... did this and worked fine...

 

Hope this helped.

Miguel

  • Like 1
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...