Download the PHP package setono/sylius-partner-ads-plugin without Composer
On this page you can find all versions of the php package setono/sylius-partner-ads-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/sylius-partner-ads-plugin
More information about setono/sylius-partner-ads-plugin
Files in setono/sylius-partner-ads-plugin
Package sylius-partner-ads-plugin
Short Description Sylius plugin that integrates Partner Ads tracking.
License MIT
Informations about the package sylius-partner-ads-plugin
Sylius Partner Ads Plugin
This plugin will track sales made by Partner Ads affiliates.
It works by saving the affiliate partner id when the visitor visits any page on your shop. Then when the user successfully completes an order it will send a HTTP request to Partner Ads telling them to credit the affiliate partner.
Installation
Step 1: Download the plugin
Step 2: Enable the plugin
Then, enable the plugin by adding it to the list of registered plugins/bundles
in the config/bundles.php
file of your project before (!) SyliusGridBundle
:
Step 3: Configure plugin
Step 4: Import routing
Step 5: HTTP client
If you already use a PSR18 HTTP client you need to inject that service:
If not, you can just do composer the Buzz library and it will automatically register the Buzz client as the HTTP client:
Step 6: Update your database schema
Step 7: Setup program
Login to your Sylius app admin and go to the Partner Ads page and click "Create" to create a new program. Fill in the program id of your Partner Ads program, make sure "enable" is toggled on, and choose which channel the program should be applied to. Please notice you should only make one program for each channel, or else you will end up with undefined behaviour.
Step 8 (optional, but recommended): Configure Async HTTP requests
This plugin will make a HTTP request to Partner Ads when a customer completes an order. This will make the 'Thank you' page load slower. To circumvent that you can use RabbitMQ with Symfony Messenger to send this HTTP request asynchronously.
Follow the installation instructions here: How to Use the Messenger and then configure a transport.
Basically you should do:
Then configure the Messenger component:
And finally configure the plugin to use your transport:
After this the Messenger will be automatically enabled in this plugin and subsequently it will send an asynchronous request to Partner Ads instead of a synchronous.
For testing purposes you can sign up for a free RabbitMQ cloud service here: CloudAMQP.
All versions of sylius-partner-ads-plugin with dependencies
ext-mbstring Version *
knplabs/knp-menu Version ^3.1
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
sylius/resource-bundle Version ^1.6
symfony/config Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/event-dispatcher Version ^5.4 || ^6.0
symfony/form Version ^5.4 || ^6.0
symfony/http-foundation Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/messenger Version ^5.4 || ^6.0
webmozart/assert Version ^1.11