Integration is easy using our provided module. Currently, we support PrestaShop 1.7 and above. The latest version can be downloaded here:
https://cdn.fanplayr.com/integrations/prestashop/packages/prestashop-1.2.0.zip
Log into your PrestaShop admin
Go to Modules and Services
Click the Add a new module button at the top right
Click Choose a file and select the PrestaShop module you downloaded.
Click Upload this module
The module should now be added to your PrestaShop store. You still need to find it and _Install _it though.
Scroll down and click on the Pricing and Promotion section of modules
You should now see Fanplayr Conversions listed.
Click the Install button.
Once installed you should see the configuration screen for Fanplayr.
Enter your Account Key and a Session Offer Prefix (see below)
Click Save
Fanplayr should now be tracking users and orders on your site!
Fanplayr has the ability to stop your users from using Fanplayr coupon codes that they were not given through the Fanplayr system. For details on how this works see, Session Offers.
Because PrestaShop does not allow modification of core functionality via modules you will need to add the following code to one of your controllers.
Prestashop 1.6 and above :
The controller can be found here: controllers/front/ParentOrderController.php
Around line 102 you will find the following code:
Prestashop 1.7 :
The controller can be found here: controllers/front/CartController.php
Around line 238, inside function updatecart() you will find the following code:
Please enter the following Fanplayr code directly below this line:
You should now not be able to use coupons that start with the Session Offer Prefix set when configuration your Fanplayr module, unless you have collected this coupon from a Fanplayr campaign.
To test that Session Offers has been implemented correctly try the following:
In the Fanplayr Configuration set a value for "Session Offer Prefix". For example, FP_
.
Create a coupon with this prefix, i.e. FP_10OFF
.
Apply this coupon to the cart. It should fail.
Visit the URL that allows this coupon, i.e: https://mystore.com/modules/fanplayr/api.php?coupon&sessionOffer&code=FP_10OFF This should allow the coupon to be used in the current session.
Apply this coupon again. This time it should apply successfully.
If the coupon does not fail at step 3. you may have to change another line of code. Try changing the following line in your "init" method:
to
Once this is complete you may need to clear your cache, remove the coupon, and try applying it again. Note that if you have already gone through step 4. you will first have to remove all cookies on the site to clear the current session.