prestashopcorp / ps_facebook
PrestaShop Social with Facebook & Instagram allows you to easily feature your products on Facebook and Instagram so people can discover and buy them.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 12
Forks: 17
Type:prestashop-module
Requires
- php: >=7.2.5
- facebook/php-business-sdk: dev-guzzle-adapter
- prestashop/module-lib-cache-directory-provider: ^1.0
- prestashop/module-lib-faq: ^2.2
- prestashop/module-lib-service-container: ^2.0
- prestashop/prestashop-accounts-installer: ^1.0
- prestashopcorp/module-lib-billing: ^3.2
- segmentio/analytics-php: ^1.5
- sentry/sentry: ^1.11.0
- vlucas/phpdotenv: ^3.4
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^8.5
- prestashop/php-dev-tools: ^4.2
- dev-master
- v1.38.2
- v1.38.2-beta.5
- v1.38.2-beta.4
- v1.38.2-beta.3
- v1.38.2-beta.2
- v1.38.2-beta.1
- v1.38.1
- v1.38.1-beta.11
- v1.38.1-beta.10
- v1.38.1-beta.9
- v1.38.1-beta.8
- v1.38.1-beta.7
- v1.38.1-beta.6
- v1.38.1-beta.5
- v1.38.1-beta.4
- v1.38.1-beta.3
- v1.38.1-beta.2
- v1.38.1-beta.1
- v1.37.1-beta.1
- v1.37.0
- v1.37.0-beta.1
- v1.36.0
- v1.36.0-beta.2
- v1.36.0-beta.1
- v1.35.0
- v1.35.0-beta.2
- v1.35.0-beta.1
- v1.34.0
- v1.34.0-beta.3
- v1.34.0-beta.2
- v1.34.0-beta.1
- v1.33.2
- v1.33.2-beta.1
- v1.33.1
- v1.33.1-beta.1
- v1.33.0
- v1.33.0-beta.8
- v1.33.0-beta.7
- v1.33.0-beta.6
- v1.33.0-beta.5
- v1.33.0-beta.4
- v1.33.0-beta.3
- v1.33.0-beta.2
- v1.33.0-beta.1
- v1.32.x-dev
- v1.32.1
- v1.32.0
- v1.32.0-beta.2
- v1.32.0-beta.1
- v1.31.1
- v1.31.1-beta.2
- v1.31.1-beta.1
- v1.31.0
- v1.31.0-beta.1
- v1.30.0
- v1.30.0-beta.2
- v1.30.0-beta.1
- v1.29.0
- v1.29.0-beta.2
- v1.29.0-beta.1
- v1.28.0
- v1.28.0-beta.1
- v1.27.1-beta.1
- v1.27.0
- v1.27.0-beta.4
- v1.27.0-beta.3
- v1.27.0-beta.2
- v1.27.0-beta.1
- v1.26.0
- v1.26.0-beta.4
- v1.26.0-beta.3
- v1.26.0-beta.2
- v1.26.0-beta.1
- v1.25.0
- v1.25.0-beta.1
- v1.24.0
- v1.24.0-beta.1
- v1.23.0
- v1.23.0-beta.1
- v1.22.0
- v1.22.0-beta.1
- v1.21.0
- v1.21.0-beta.1
- v1.20.0
- v1.20.0-beta.1
- v1.19.0
- v1.19.0-beta.1
- v1.18.6
- v1.18.5
- v1.18.4
- v1.18.3
- v1.18.2
- v1.18.1
- v1.18.0
- v1.18.0-beta.2
- v1.18.0-beta.1
- v1.17.0
- v1.16.0
- v1.16.0-beta.5
- v1.16.0-beta.4
- v1.16.0-beta.3
- v1.16.0-beta.2
- v1.16.0-beta.1
- v1.15.0
- v1.14.1
- v1.14.0
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.1
- v1.5.0
- v1.4.5
- v1.4.4
- v1.4.2
- 1.4.0
- v1.2.0-beta.1
- v1.0.0-alpha.4
- v1.0.0-alpha.3
- v1.0.0-alpha.2
- v1.0.0-alpha.1
- dev-l10n_master
- dev-test
- dev-revert-471-announcement-of-next-version
This package is auto-updated.
Last update: 2024-11-21 09:51:03 UTC
README
PrestaShop Social with Facebook & Instagram (ps_facebook)
Installation
Use make build
to install dependencies (or make docker-build
to run it within docker).
Check other commands with make help
.
Requirements
This module is compliant with PrestaShop 1.7+. PHP compatibility can be found in composer.json
.
You need a facebook developper account added to the PrestaShop Social Media app (ID:726899634800479) to manage its settings.
CDN usage
If you want to use local vue app, set on your .env USE_LOCAL_VUE_APP at 1.
USE_LOCAL_VUE_APP=1
Usage
Install module and connect to FBE in module BO
Delivery
Automatic
This package should be automatically delivered by the CI/CD, see the github workflows. Zips should be available for each releases.
Manual
- Fill up
.env.inte
and.env.prod
files - Use
make bundle
to build up deliverable zips for integration and production purpose. - Find zips within the
./dist
directory
About
Compliancy with PrestaShop 1.6
This module is not compliant with PS 1.6 as some Pixel events could not be implemented properly on this version (i.e CustomizeProduct
).
This avoids potential misunderstanding about mismatching behavior of the module with different versions of PrestaShop.
Facebook Pixel
- Pixel & GDPR
Based of the Facebook documentation about GDPR,
a user may revoke his consent to use Pixel. This can be notified to Facebook by calling fbq('consent', 'revoke');
.
Cookies management modules are available on the PrestaShop marketplace to allow the management of Facebook features
to each user.
For third-party module developers, this module will revoke the consent to use Pixel if the proper JS variable is set in the page content before the initialization of this module:
window.doNotConsentToPixel = true;
- Using Pixel event in other modules
You can call custom Pixel event by using hook: actionFacebookCallPixel
You also need to add some params in hook call
Required:
- eventName
- module
Optional:
- id_product
- id_product_attribute
Example:
Hook::exec('actionFacebookCallPixel' ,['eventName' => 'AddToWishlist', 'module' => 'wishlist', 'id_product' => $productId, 'id_product_attribute' => $idProductAttribute]);
- Documentation
Development
The main branch receiving all kind of contributions (bug fixes, improvements & new features) is the master
branch.
In the future we may maintain several branches at the same time, for instance to fix the current version in production while we prepare new features for the next release.
These branches would be defined as [1-9]*.[1-9]*.x
(for instance 1.4.x
).
- Running with dev dependencies
composer install --dev
- Working with VueJS app
To set the build of the VueJS app in development mode and watching your changes:
cd _dev
npm run dev
- Replacing config values of the project
Some values of the Config class can be overwriten by having your own environment variables.
You can for instance have your own .env
at the root of this project to replace the Facebook App ID
or switch the API URLs to another domain.
Tests
This module follows recommandations of the PrestaShop devdocs and is checked by PHP-CS-Fixer, PHPStan and PHPUnit before each release.
Two sets of tests have been implemented in this module:
- Unit tests
vendor/bin/phpunit tests/unit/
- Integration tests
These tests run the calls to Facebook API to make sure the data the module relies on is still valid. It requires preliminary configuration, by setting your FBE configuration in a JSON config file.
cp tests/integration/config.json.dist tests/integration/config.json
# Edit your config.json, then
vendor/bin/phpunit tests/integration/ -v
Storybook
Here available storybooks URLs according to existing environments :
Integration Storybook
Preproduction Storybook
Production Storybook