Developing and making changes to a website can be difficult as even one small mistake can take up your whole day despite your efforts and knowledge.
When we first started using and working with Prestashop, it was a real mess and very time consuming. I remember the first time we tried to change some colors in the default theme. It was a small change, just a different color for the footer area. But guess what? When we uploaded the new theme files, nothing changed; the color was still the default one, and we had no idea what was wrong. The first thing we tried was deleting the browser cache but no luck.
After quite some time, we managed to change the footer area color. The mistake we had made was so minimal that decided that we needed to share the small change we made to the Prestashop settings to help beginners before they give up on this awesome, open source, e-commerce platform.
The first thing you want to do when installing Prestashop is to put it in maintenance mode, which will lock out visitors. You will be the only one who can see your web store. It is a good idea to deactivate your shop while you perform maintenance.
- Go to https://www.whatismyip.com/ to find out your IP.
- In the Prestashop Back Office, go to Preferences>Maintenance.
- Set Enable Shop to NO.
- Enter your IP, which you found in step 1, and save.
Prestashop Back Office Settings
When you start modifying theme files or changing banners, text, or translation, you will need to set your Back Office settings to show front page changes instantly. Follow these steps and any changes you make will be visible instantly:
- In the Prestashop Back Office, go to Advanced Parameters>Performance.
- Under this menu, change “Template Compilation” to “Force Compilation.”
- Set Cache to NO.
- Check at the bottom of the page if caching is set to NO.
If you have trouble with images or thumbnails, you will need to regenerate them. In the Back Office, go to Preferences>Images. At the bottom, click the “Regenerate Thumbnails” button, which will regenerate thumbnails for all existing images. Be patient because this can take several minutes if you have many images.
The default settings of Prestashop are not good when you are making changes to Prestashop PHP files because no errors are displayed by default. To enable this feature, follow these steps. It is quite easy to turn error messages ON.
- Go to the server where you have Prestashop installed and open the “/config/defines.inc.php” file with Notepad++ or another text/html editor.
- In line “define(‘_PS_MODE_DEV_’, false);,” change “false” to “true” and save your changes.
- Now any suspicious or blank pages should give more information about the problem.
Another useful thing when debugging or developing is the Code Profiler. The Code Profiler will show you information and statistics below the content, which you can use to improve performance or check for any fixes. To turn on this feature follow these three steps.
- Once again, go to your server and open the “/config/defines.inc.php” file using your favorite code/text editor.
- Find line “define(‘_PS_DEBUG_PROFILING_’, false);”.
- Change value “false” to “true” and save changes.
If you have any questions or comments regarding debugging or modifying Prestashop, leave them below, and we will answer or comment on them as soon as possible.