Plugin that allows to configure the Doofinder search service in a Prestashop 1.5 store with less effort than configuring it from scratch.
Important
If you experience any issue with the module, please contact Doofinder Support from the Doofinder website.
Refer to Doofinder Support Documentation for Prestashop for the latest and up to date instructions.
The minimum php required for this module is php 5.4 The maximum php version tested is 8.4
From 1.5.0.17 to latest version
For more compatibility details check the following documentation
- Prestashop 1.x system requirements.
- Prestashop 8 system requirements.
- Prestashop 9 system requirements.
In order to be able to create an account or login to an existing Doofinder account during the module initial setup, you will have to expose your local webserver to the internet (to receive a callback).
To do so, you can use, for example, the utility ngrok: https://dashboard.ngrok.com/get-started/setup
Once the external URL is created, simply set the BASE_URL environment variable (see Environment Variables).
So, when the installation process finished, instead of accessing to https://localhost:4011 you will use your url, for example, https://forcibly-ethical-apple.ngrok-free.app).
Notice that you'll need to specify the 4011 port when executing ngrok.
Tip
You can create an .env.local file to override the environment variables defined in .env such as PrestaShop installation data to fit your needs.
For example, below is a base .env.local file:
#PrestaShop setup configuration data
BASE_URL=your-url.ngrok-free.app
PS_ENV=dev
The Makefile automatically overrides .env vars with the ones found in .env.local.
Important
The Makefile internally appends --env-file .env --env-file .env.local to docker compose command for properly configuring container environment. So take it into account when interacting directly with docker compose.
You can set up a fresh PrestaShop installation using the provided Makefile target init. This command will:
- Pulls and build a PrestaShop docker image with xdebug extension and maybe other tweaks. This build is configurable using the environment variables
PHP_VERSIONandPS_VERSIONenvironment variables. - Starts the containers
- Runs the installer script with the defined environment variables.
Finally, PrestaShop is installed and will be running at https://BASE_URL.
You can install the Doofinder module through the admin or execute make doofinder-upgrade.
The admin panel will be available at https://BASE_URL/PS_FOLDER_ADMIN. Admin credentials are defined in the .env, if you used the env.example would be:
- User:
[email protected] - Pass:
admin123
Note
Keep in mind that for versions prior to 1.7 PrestaShop will ask you to delete the install folder and rename the admin folder located in the html directory.
For newer versions this is done automatically, using the value on the environment variable PS_FOLDER_ADMIN (by default, /4dm1n).
Starting from version 6.0.0, this plugin uses the Composer autoloader, which is generated by running composer dump-autoload via the make dump-autoload command. This target is always executed after make doofinder-configure. If you create a new class, you must run make dump-autoload manually to make the class discoverable by PrestaShop.
To upgrade the package version, simply edit the PLUGIN_VERSION environment variable in the .env file and run make doofinder-configure. This will update all the necessary files. However, you must manually edit the doofinder.php file, as PrestaShop requires that $this->version be a hardcoded value.
If you wish to debug your new PrestaShop installation, the XDEBUG_CONFIG and XDEBUG_MODE environment variables are already configured in docker-compose.yml. Simply configure your IDE accordingly and have fun!
You can remove the Doofinder module using this straightforward method:
make doofinder-uninstallChange your branch to the tag that you want inside package directory
make doofinder-upgradeDuring development, it is sometimes useful to create a data snapshot before performing an action.
- To create a database dump, use:
make db-backup [prefix=_some_state] - To restore a previous state, run:
make db-restore file=backup_file.sql.gz
You can test different Prestashop versions along with different PHP versions. These are the latest combinations available gathered from PrestaShop Docker Hub
| PrestaShop | PHP |
|---|---|
| 8.2.1 | 8.1, 8.0, 7.4, 7.3, 7.2 |
| 8.1.7 | 8.1, 8.0, 7.4, 7.3, 7.2 |
| 8.0.5 | 8.1, 8.0, 7.4, 7.3, 7.2 |
| 1.7.8.9 | 7.4, 7.3, 7.2, 7.1 |
| 1.6 | 7.2, 7.1, 7.0, 5.6 |
| 1.51 | 7.2, 7.1, 7.0, 5.6, 5.5 |
Footnotes
-
Prestashop 1.5: This version is patched to allow auto installation (See Dockerfile). MySQL version must be 5.5. Must be used without SSL. β©