Frequently Asked Questions


#How to set my PrestaShop in test mode ?

To enable the test mode on your PrestaShop, you will need to use the _PS_IN_TEST_ constant.

In order to allow you to enable it only while PrestaFlow will perform a test, you can define it regarding the User Agent.

Copied!
1if ($_SERVER['HTTP_USER_AGENT'] == 'PrestaFlow') {
2 define('_PS_IN_TEST_', true);
3}

Also, you will need to copy your img folder into the tests/Resources/img folder if it doesn't yet exists.

#Handle the .htpasswd on my preprod

As now, there is no method to fill the form where the user and password are asked once a .htpasswd file is present on your instance.

To avoid any issue with that, you can still use them inside the URL - as it's in the .env file - like this : https://preprod:passwd@preprod.url