Changes

m
→‎For Emails: Précisions sur les variables __UNSUBSCRIBE__ et __CHECK_READ__ spécifiques aux emailings
Line 2: Line 2:  
<!-- You can edit this section but do NOT remove these comments
 
<!-- You can edit this section but do NOT remove these comments
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
[[fr:Système de substitution de variables]]
+
[[fr:Système_de_substitution_de_variables]]
 +
[[zh:变量替换系统]]
 
<!-- END interlang links -->
 
<!-- END interlang links -->
   Line 15: Line 16:     
=Substitution variables available=
 
=Substitution variables available=
 +
 +
==Dolibarr User==
    
*
 
*
   −
{| class="wikitable sortable"
+
{| class="wikitable sortable" style="width: 85%;"
 
|+
 
|+
 
!Variable
 
!Variable
Line 24: Line 27:  
!Note
 
!Note
 
!Dolibarr Mini
 
!Dolibarr Mini
 +
|-
 +
|__USER_SIGNATURE__
 +
|My beautiful signature
 +
|User signature
 +
|
 
|-
 
|-
 
|__USER_SIGNATURE__
 
|__USER_SIGNATURE__
Line 63: Line 71:  
|xxx.xxx.xxx.xxx
 
|xxx.xxx.xxx.xxx
 
|User remote IP
 
|User remote IP
|
+
|}
 +
 
 +
*
 +
 
 +
==My Company==
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__MYCOMPANY_NAME__
 
|__MYCOMPANY_NAME__
Line 73: Line 94:  
|contact@mycompany.com
 
|contact@mycompany.com
 
|My company contact email
 
|My company contact email
 +
|
 +
|-
 +
|__MYCOMPANY_PHONE__
 +
|0123456789
 +
|My company phone number
 +
|
 +
|-
 +
|__MYCOMPANY_FAX__
 +
|0123456789
 +
|My company fax number
 
|
 
|
 
|-
 
|-
Line 138: Line 169:  
|1
 
|1
 
|Country ID of the company address
 
|Country ID of the company address
 +
|
 +
|-
 +
|__MYCOMPANY_COUNTRY_CODE__
 +
|1
 +
|Country Code of the company address
 
|
 
|
 
|-
 
|-
Line 144: Line 180:  
|Main currency
 
|Main currency
 
|
 
|
 +
|}
 +
 +
*
 +
 +
==Object==
 +
===Generic===
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__ID__
 
|__ID__
Line 165: Line 216:  
|
 
|
 
|-
 
|-
|__EXTRAFIELD_XXX__
+
|__NOTE_PUBLIC__
 +
|My Public note
 +
|Object Public Note
 +
|V 13
 +
|-
 +
|__NOTE_PRIVATE__
 +
|My Private note
 +
|Object Private Note
 +
|V 13
 +
|-
 +
|__DATE_DELIVERY__
 +
|01/02/2021
 +
|Delivery date
 +
|V 13
 +
|}
 +
 
 +
*
 +
 
 +
===Objects with amounts===
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__DATE_YMD__
 +
|1/1/2020
 +
|Object date
 +
|
 +
|-
 +
|__DATE_DUE_YMD__
 +
|1/1/2020
 +
|Due date
 +
|
 +
|-
 +
|__AMOUNT__
 +
|1243.34
 +
|Amount
 +
|
 +
|-
 +
|__AMOUNT_TEXT__
 +
|One thousand five hundred ...
 +
|Amount in words
 +
|V13
 +
|-
 +
|__AMOUNT_TEXTCURRENCY__
 +
|One thousand five hundred ...
 +
|Amount in words with currency
 +
|V13
 +
|-
 +
|__AMOUNT_EXCL_TAX__
 +
|1234.45
 +
|Amount without taxes
 +
|
 +
|-
 +
|__AMOUNT_VAT__
 +
|123.4
 +
|VAT amount
 +
|
 +
|-
 +
|__AMOUNT_VAT_TEXT__
 +
|One thousand five hundred ...
 +
|VAT Amount in words
 +
|V13
 +
|-
 +
|__AMOUNT_VAT_TEXTCURRENCY__
 +
|One thousand five hundred ...
 +
|VAT Amount in words with currency
 +
|V13
 +
|-
 +
|__AMOUNT_TAX2__
 +
|123.4
 +
|TAX2 amount
 +
|
 +
|-
 +
|__AMOUNT_TAX3__
 +
|123.4
 +
|TAX3 amount
 +
|
 +
|-
 +
|__AMOUNT_FORMATED__
 +
|1243.34 €
 +
|Amount formated
 +
|
 +
|-
 +
|__AMOUNT_EXCL_TAX_FORMATED__
 +
|1234.45 €
 +
|Amount without taxes formated
 +
|
 +
|-
 +
|__AMOUNT_VAT_FORMATED__
 +
|123.4 €
 +
|VAT amount formated
 +
|
 +
|-
 +
|__AMOUNT_TAX2_FORMATED__
 +
|123.4 €
 +
|TAX2 amount formated
 +
|V13
 +
|-
 +
|__AMOUNT_TAX3_FORMATED__
 +
|123.4 €
 +
|TAX3 amount formated
 +
|V13
 +
|-
 +
|__AMOUNT_MULTICURRENCY__
 +
|1234.45 $
 +
|Amount in Multicurrency
 +
|V13
 +
|-
 +
|__AMOUNT_MULTICURRENCY_TEXT__
 +
|One thousan five hundred ...
 +
|Amount in Multicurrency in words
 +
|V13
 +
|-
 +
|__AMOUNT_MULTICURRENCY_TEXTCURRENCY__
 +
|One thousan five hundred ...
 +
|Amount in Multicurrency in words with currency
 +
|V13
 +
|}
 +
 
 +
*
 +
 
 +
==Member==
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__MEMBER_ID__
 +
|123
 +
|Member ID
 +
|V 13
 +
|-
 +
|__MEMBER_CIVILITY__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_FIRSTNAME__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_LASTNAME__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_FULLNAME__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_COMPANY__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_ADDRESS__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_ZIP__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_TOWN__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_COUNTRY__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_EMAIL__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_BIRTH__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_PHOTO__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_LOGIN__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_PASSWORD__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_PHONE__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_PHONEPRO__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_PHONEMOBILE__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_TYPE__
 +
|Member
 +
|Type of member
 +
|V 13
 +
|-
 +
|__MEMBER_FIRST_SUBSCRIPTION_DATE__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_FIRST_SUBSCRIPTION_DATE_START__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_FIRST_SUBSCRIPTION_DATE_END__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_LAST_SUBSCRIPTION_DATE__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_LAST_SUBSCRIPTION_DATE_START__
 +
|
 +
|
 +
|V 13
 +
|-
 +
|__MEMBER_LAST_SUBSCRIPTION_DATE_END__
 
|
 
|
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
   
|
 
|
 +
|V 13
 +
|}
 +
 +
*
 +
 +
==Thirdparty==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__THIRDPARTY_ID__
 
|__THIRDPARTY_ID__
Line 184: Line 507:  
|Third party name alias of the object
 
|Third party name alias of the object
 
|
 
|
 +
|-
 +
|__THIRDPARTY_CODE_CLIENT__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_CODE_FOURNISSEUR__
 +
|
 +
|
 +
|V13
 
|-
 
|-
 
|__THIRDPARTY_EMAIL__
 
|__THIRDPARTY_EMAIL__
Line 189: Line 522:  
|Third party email of the object
 
|Third party email of the object
 
|
 
|
 +
|-
 +
|__THIRDPARTY_PHONE__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_FAX__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_ADDRESS__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_ZIP__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_TOWN__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_COUNTRY_ID__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_COUNTRY_CODE__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF1__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF2__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF3__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF4__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF5__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_IDPROF6__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_TVAINTRA__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_NOTE_PUBLIC__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__THIRDPARTY_NOTE_PRIVATE__
 +
|
 +
|
 +
|V13
 +
|}
 +
 +
*
 +
 +
==Candidate==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__CANDIDATE_FULLNAME__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__CANDIDATE_FIRSTNAME__
 +
|
 +
|
 +
|V13
 +
|-
 +
|__CANDIDATE_LASTNAME__
 +
|
 +
|
 +
|V13
 +
|}
 +
 +
*
 +
 +
==Project==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__PROJECT_ID__
 
|__PROJECT_ID__
Line 204: Line 660:  
|Project name of the object
 
|Project name of the object
 
|
 
|
 +
|}
 +
 +
*
 +
 +
==Shipment==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__SHIPPINGTRACKNUM__
 +
|XXXXX
 +
|Shipping tacking number
 +
|
 +
|-
 +
|__SHIPPINGTRACKNUMURL__
 +
|http://trackingcompagny.com/XXXXX
 +
|Shipping tracking url
 +
|
 +
|}
 +
 +
*
 +
 +
==Reception==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__RECEPTIONTRACKNUM__
 +
|XXXXX
 +
|Shipping tacking number
 +
|V13
 +
|-
 +
|__RECEPTIONTRACKNUMURL__
 +
|http://trackingcompagny.com/XXXXX
 +
|Shipping tracking url
 +
|V13
 +
|}
 +
 +
*
 +
 +
==Contract==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__CONTRACT_HIGHEST_PLANNED_START_DATE__
 
|__CONTRACT_HIGHEST_PLANNED_START_DATE__
Line 223: Line 741:  
|1/1/2020 1PM
 
|1/1/2020 1PM
 
|Lowest date and hour for planned expiration of service
 
|Lowest date and hour for planned expiration of service
 +
|
 +
|}
 +
 +
*
 +
 +
==Extrafield==
 +
===Generic Rule===
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__EXTRAFIELD_XXX__
 +
|
 +
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
 +
|
 +
|}
 +
 +
*
 +
 +
===Date Extrafield===
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__EXTRAFIELD_XXX__
 +
|
 +
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
 
|
 
|
 
|-
 
|-
|__ONLINE_PAYMENT_URL__
+
|__EXTRAFIELD_XXX_LOCALE__
|http://mydoli.com/payment
+
|
|Address of the Online payement if applicable
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code) in locale
 
|
 
|
 
|-
 
|-
|__ONLINE_PAYMENT_TEXT_AND_URL__
+
|__EXTRAFIELD_XXX_RFC__
|Click to pay
+
|
|Text and Url to pay online if applicable
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code) in RFC
 
|
 
|
 +
|}
 +
 +
*
 +
 +
===Datetime Extrafield===
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
|__SECUREKEYPAYMENT__
+
|__EXTRAFIELD_XXX__
 
|
 
|
|Security key (if key is not unique per record)
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
 
|
 
|
 
|-
 
|-
|__SECUREKEYPAYMENT_MEMBER__
+
|__EXTRAFIELD_XXX_LOCALE__
 
|
 
|
|Security key for payment on a member subscription (one key per member)
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code) in locale
 
|
 
|
 
|-
 
|-
|__SECUREKEYPAYMENT_ORDER__
+
|__EXTRAFIELD_XXX_DAY_LOCALE__
 
|
 
|
|Security key for payment on an order
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code) only the day in locale
 
|
 
|
 
|-
 
|-
|__SECUREKEYPAYMENT_INVOICE__
+
|__EXTRAFIELD_XXX_RFC__
 
|
 
|
|Security key for payment on an invoice
+
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code) in RFC
 +
|
 +
|}
 +
 
 +
*
 +
 
 +
==Online Payment==
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__ONLINE_PAYMENT_URL__
 +
|http://mydoli.com/payment
 +
|Address of the Online payement if applicable
 
|
 
|
 
|-
 
|-
|__SECUREKEYPAYMENT_CONTRACTLINE__
+
|__ONLINE_PAYMENT_TEXT_AND_URL__
 +
|Click to pay
 +
|Text and Url to pay online if applicable
 
|
 
|
|Security key for payment on a a service
+
|-
 +
|}
 +
 
 +
*
 +
 
 +
==Online Proposal Signature==
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__ONLINE_SIGN_URL__
 +
|[https://mydoli.com/public/onlinesign http://mydoli.com/public/onlinesign]
 +
|Address of the Online Signature for proposal
 +
|15
 +
|-
 +
|}
 +
 
 +
*
 +
 
 +
==Online Intervention Signature==
 +
 
 +
*
 +
 
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__ONLINE_SIGN_FICHINTER_URL__
 +
|[https://mydoli.com/public/onlinesign http://mydoli.com/public/onlinesign]
 +
|Address of the Online Signature for intervention
 
|
 
|
 +
|-
 +
|}
 +
 +
*
 +
 +
==Document download==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__DIRECTDOWNLOAD_URL_PROPOSAL__
 
|__DIRECTDOWNLOAD_URL_PROPOSAL__
Line 275: Line 920:  
|
 
|
 
|-
 
|-
|__SHIPPINGTRACKNUM__
+
|__DIRECTDOWNLOAD_URL_FICHINTER__
|XXXXX
+
|http://mydoli.com/fichinter.pdf
|Shipping tacking number
+
|Direct download url of an intervention. This needs that the setup FICHINTER_ALLOW_EXTERNAL_DOWNLOAD is set to allow to generate the link.
 
|
 
|
 
|-
 
|-
|__SHIPPINGTRACKNUMURL__
+
|__URL_PROPOSAL__
|http://trackingcompagny.com/XXXXX
+
|http://mydoli.com/comm/propal/card.php?id=xxx
|Shipping tracking url
+
|
 
|
 
|
 
|-
 
|-
|__DATE_YMD__
+
|__URL_ORDER__
|1/1/2020
+
|http://mydoli.com/commande/card.php?id=xxxx
|Actual date
+
|
 
|
 
|
 
|-
 
|-
|__DATE_DUE_YMD__
+
|__URL_INVOICE__
|1/1/2020
+
|http://mydoli.com/compta/facture/card.php?id=xxx
|Due date
+
|
 
|
 
|
 
|-
 
|-
|__AMOUNT__
+
|__URL_FICHINTER__
|1243.34
+
|
|Amount
+
|
 
|
 
|
 +
|}
 +
 +
*
 +
 +
==Event==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
|__AMOUNT_EXCL_TAX__
+
|__EVENT_LABEL__
|1234.45
+
|
|Amount without taxes
   
|
 
|
 +
|V13
 
|-
 
|-
|__AMOUNT_VAT__
+
|__EVENT_DATE__
|123.4
  −
|VAT amount
   
|
 
|
|-
  −
|__AMOUNT_FORMATED__
  −
|1243.34 €
  −
|Amount formated
   
|
 
|
 +
|V13
 
|-
 
|-
|__AMOUNT_EXCL_TAX_FORMATED__
+
|__EVENT_TIME__
|1234.45 €
  −
|Amount without taxes formated
   
|
 
|
|-
  −
|__AMOUNT_VAT_FORMATED__
  −
|123.4 €
  −
|VAT amount formated
   
|
 
|
 +
|V13
 +
|}
 +
 +
*
 +
 +
==Dates==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__DAY__
 
|__DAY__
Line 399: Line 1,062:  
|next year
 
|next year
 
|
 
|
 +
|}
 +
 +
*
 +
 +
==Multicompany==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 +
|-
 +
|__ENTITY_ID__
 +
|
 +
|
 +
|V13
 +
|}
 +
 +
*
 +
 +
==System==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__DOL_MAIN_URL_ROOT__
 
|__DOL_MAIN_URL_ROOT__
Line 409: Line 1,105:  
|Any translation Key
 
|Any translation Key
 
|
 
|
 +
|-
 +
|<nowiki>__(AnyTranslationKey|langfile)__</nowiki>
 +
|Translation
 +
|Any translation Key (load also language file before)
 +
|V13
 
|-
 
|-
 
|__[AnyConstantKey]__
 
|__[AnyConstantKey]__
Line 414: Line 1,115:  
|Value of a constant key
 
|Value of a constant key
 
|
 
|
 +
|}
 +
 +
*
 +
 +
==For Emails==
 +
 +
*
 +
 +
{| class="wikitable sortable" style="width: 85%;"
 +
|+
 +
!Variable
 +
!Displayed Value
 +
!Note
 +
!Dolibarr Mini
 
|-
 
|-
 
|__CONTACT_NAME_XXX__
 
|__CONTACT_NAME_XXX__
|Mr T
+
|Mister T
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILLING__ for the billing contact). The output will be Title + LastName + First Name
+
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILLING__ for the billing contact). The output will be LastName + First Name
 +
|V14
 +
|-
 +
|__CONTACT_LASTNAME_XXX__
 +
|T
 +
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILLING__ for the billing contact).
 +
|V14
 +
|-
 +
|__CONTACT_FIRSTNAME_XXX__
 +
|Mister
 +
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILLING__ for the billing contact).
 +
|V14
 +
|-
 +
|__CONTACT_TITLE_XXX__
 +
|Mr
 +
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILLING__ for the billing contact).
 +
|V14
 +
|-
 +
|__CHECK_READ__
 +
|
 +
|In emailings, insert a blank image with a callback URL to Dolibarr (/public/emailing/mailing-read.php?tag=)
 +
|
 +
|-
 +
|__UNSUBSCRIBE__
 +
|
 +
|In emailings, insert a link to allow a recipient to unsubscribe from emailings. If the recipient (third party or contact) unsubscribes, his status will change to "Refuse bulk emailings"
 +
To setup the wording of:
 +
 
 +
- the mention in your email  for unsubscribing: Translation (key : MailUnsubcribe)
 +
 
 +
- the landing page after unsubscribing: Translation (key: YourMailUnsubcribeOK)
 
|
 
|
 
|}
 
|}
Line 423: Line 1,168:  
*
 
*
   −
=Custom substitution variables=
+
=Substitution variables provide by external module=
 +
Custom substitution variables can be added by external modules.
 +
For this, the external module must embed a file called  '''mymodule/core/substitutions/functions_mymodules.lib.php''' and set the
 +
 
 +
<code>$this->module_parts['substitutions'] = 1 </code>
 +
 
 +
into the module descriptor.
 +
 
 +
=How it work=
 +
The array to define all substitution variables is defined in code by calling the method
 +
<code>$substitutionarray = getCommonSubstitutionArray().</code>
 +
This method receive the $object in parameter, so it can define the content of the substitution array using properties of this object. No database access and no IO are allowed to set the substitution array.
 +
 
 +
Then the array will be used by calling the make_substitutions() this way:
 +
<code>$textcompleted = make_substitutions($textwithsubtitutionkeys, $substitutionarray)</code>
 +
 
 +
 
 +
However, sometimes to value to use is not available into the $object, neither into the environment, and it needs a database access to get the value.
 +
In such a case, the substitution is not done by the getCommonSubstitutionArray(). The getCommonSubstitutionArray() will just add an entry into the array of substitution with the information to explain how to get the value like for this entry:
 +
<code>$substitutionarray['__PROJECT_NAME__@lazyload'] = '/projet/class/project.class.php:Project:fetchAndSetSubstitution:'.$object->id</code>
 +
The substitution will be done by the make_substitutions() and only it is required by calling the method defined (here fetchAndSetSubstitution with the param $object->id of the object Project defined into file /projet/class/project.class.php).
 +
Thus, the heavy database access is done only if required.
19

edits