Installs: 45

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 2

Open Issues: 1


dev-master 2018-07-24 08:26 UTC

This package is auto-updated.

Last update: 2020-07-18 17:55:53 UTC


Ce plugin permet aux clients qui parrainent de nouveaux clients d'obtenir une réduction sur leur prochaine commande sous la forme d'un code promo standard qui leur est expédié par mail.

Le filleuls peuvent obtenir une remise en pourcentage paramétrable sur leur première commande.

Contact et support: Franck Allimant / CQFDev -



  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is ParainageSimple.
  • Activate and update settings it in your thelia administration panel


Add it in your main thelia composer.json file

composer require your-vendor/product-upsell-module:~1.0


Go to module configuration and enter your settings :

  • check "send sponsor code" if you want to register beneficiary id, firstname, lastname, email associated with sponsor id With this option you can have the invitation status invitation sent / accepted and also know how much a sponsor earn from each beneficiaries. This option work with a unique code in invitation instead of the sponsor email
  • select the sponso discount type
  • enter the sponso coupon amount
  • enter the minimum cart amount the sponsor must have to use it coupon
  • enter the beneficiary discount in percent


Hook on bo module.configuration - edit module conf Hook on bo customer.edit - display beneficiary's sponsor Hook on fo register.form-bottom - enter a sponsor code or sponsor email on customer registration Hook on fo - display invitation form



loop that return sponsorship values if configuration to use invitation with code is not active it des not return anything

Input arguments

Argument Description
id filter by sponsorship id
sponsor_id filter by sponsor id
beneficiary_email filter by beneficiary id
status filter by status

Output arguments

Variable Description
ID sponsorship id
SPONSOR_ID sponsor id
BENEFICIARY_ID beneficiary id
BENEFICIARY_EMAIL beneficiary email
BENEFICIARY_FIRSTNAME beneficiary firstname
BENEFICIARY_LASTNAME beneficiary lastname
SPONSOR_COUPON_AMOUNT amount the sponsor earn with this sponsorship
BENEFICIARY_COUPON_AMOUNT amount the beneficiary earn with this sponsorship
STATUS invitation status


{loop type="sponsorship" name="sponsorship_loop"} {/loop}


return all sponsor customers with a coupon from sponsorship

Input arguments

Output arguments

Variable Description
CUSTOMER_ID customer id
COUPON_ID coupon id


{loop type="parainagesimple" name="parainagesimple_loop"} {/loop}


return this module config

Input arguments

Output arguments

Variable Description
TYPE_PARRAINAGE percent or amount
VALEUR_REMISE_FILLEUL beneficiary discount amount
VALEUR_REMISE_PARRAIN sponsor discount amount
MONTANT_ACHAT_MINIMUM minimum cart amount for sponsor to use coupon


{loop type="info-parainagesimple" name="info_parainagesimple_loop"} {/loop}

Other ?

If you have other think to put, feel free to complete your readme as you want.