March 07, 2023 • For devs
Manage errors in PrestaShop
We're Streply, a tool that tracks errors and manages logs quickly. It's easy to set up and compatible with many popular frameworks. Made by developers, for developers! If you need to keep an eye on errors and follow logs in your app, create free account.
If you run an online shop or create shops or e-commerce applications based on PrestaShop, it is very important for the stability and development of your business to ensure that PrestaShop errors are handled well. By default, PrestaShop log errors save all logs in files. Reviewing and analysing this is very inconvenient, time-consuming and in many cases can very negatively affect your business.
Good error handling PrestaShop will affect both the security and quality of your shop.
See how to manage errors in PrestaShop software.
Showing errors in PrestaShop
By default, PrestaShop hides errors that occur to users. Of course, you can enable them but displaying errors on the user screen is a very bad idea. Firstly, it looks very unprofessional. The standard user who has no technical knowledge will not understand what has just happened and what the problem is. Secondly, the more important problem is that a technical person will be able to understand the error and in some cases it can affect the security of the business.
If you don’t want PrestaShop to show errors on the user's screen or store logs in files, you can use software for errors management in PrestaShop.
Handling errors in PrestaShop
An Integration of PrestaShop with Streply is extremely simple. Thanks to a dedicated PrestaShop package the process will take only 2-3 minutes. Once our library is installed, it will send all errors that occur to Streply. Streply will not only give you access to all errors in one place but it will also give you the ability to set up notifications so you will know immediately when an error occurs.
In addition, all errors will be grouped into unique issues, making it easier for programmers to work with errors. You won't have to go through dozens of logs; Streply will automatically group errors that occur multiple times into unique issues that you can immediately prioritise and assign to a programmer in the Streply dashboard.
You will also see not only the history of the occurrence of this error but also all the information about the error, the situation in which it occurred and the selected parts of the code that led to the error.
Be notified when an error has occurred
When logs are stored internally, you won't know that something has happened until a programmer reviews them or a customer reports that an error has occurred. Thanks to Streply you will not only be able to view all errors in one convenient dashboard but you will also be notifed when something unexpected happens in your shop.
How to handle errors in PrestaShop
Installing Streply is very easy, regardless of the structure of your project. It only takes 3 simple steps and in 5 minutes to activate Streply in your project.
At the very beginning, you need to download a library for PHP (streply/streply-php). The recommended way is to download Streply using Composer. You can also download the actual zip package from our page on GitHub.
composer require streply/streply-php
Streply initialisations are performed using the Initialize method, which should be placed at the very beginning of the code (e.g. in the index.php file). The method receives the (string) DSN as the first parameter.
Streply\Initialize('https://clientPublicKey@api.streply.com/projectId');
You can read more in our documentation.
If you want to see how Streply works in practice, check out our demo.
- We are not pushy
- We only send a few emails every month. That's all.
- No spam
- We only send articles, and helpful tips for developers, not SPAM.