Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SUD Éducation
Cartable
Commits
3829d62a
Commit
3829d62a
authored
3 months ago
by
Bastien Ho
Browse files
Options
Download
Email Patches
Plain Diff
Manage contribution_url token
parent
422fbd87
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cartable/CRM/Cartable/CivirulesActions/SendEmailForPayments.php
+1
-1
...le/CRM/Cartable/CivirulesActions/SendEmailForPayments.php
cartable/cartable.php
+4
-3
cartable/cartable.php
cartable/settings/cartable.setting.php
+26
-0
cartable/settings/cartable.setting.php
with
31 additions
and
4 deletions
+31
-4
cartable/CRM/Cartable/CivirulesActions/SendEmailForPayments.php
+
1
-
1
View file @
3829d62a
...
...
@@ -133,7 +133,7 @@ class CRM_Cartable_CivirulesActions_SendEmailForPayments extends CRM_Civirules_A
];
$sent
=
CRM_Core_BAO_MessageTemplate
::
sendTemplate
(
$params
);
Civi
::
log
()
->
debug
(
"Cartable: Reçu de contribution contact. sent"
,
$sent
);
//
Civi::log()->debug("Cartable: Reçu de contribution contact. sent", $sent);
}
if
(
isset
(
$syndicateEmails
)
&&
isset
(
$syndicateEmails
[
0
][
'email'
]))
{
...
...
This diff is collapsed.
Click to expand it.
cartable/cartable.php
+
4
-
3
View file @
3829d62a
...
...
@@ -1223,7 +1223,6 @@ function cartable_evaluate_tokens(\Civi\Token\Event\TokenValueEvent $e)
if
(
empty
(
$usedTokens
[
'SUD'
])){
return
;
}
Civi
::
log
()
->
debug
(
'Cartable: Used tokens '
,
$usedTokens
);
// Compute contact_ids
$contacts
=
[];
...
...
@@ -1296,14 +1295,16 @@ function cartable_evaluate_tokens(\Civi\Token\Event\TokenValueEvent $e)
}
}
}
Civi
::
log
()
->
debug
(
'Cartable: indexed_memberships tokens '
,
$indexed_memberships
);
}
// FIND contribution URL
if
(
in_array
(
'contribution_url'
,
$usedTokens
[
'SUD'
])
){
// Todo: manage SUD.contribution_url in settings
$profileUrl
=
civicrm_api4
(
'Setting'
,
'get'
,
[
'select'
=>
[
'cartable_profile_url'
,],
'checkPermissions'
=>
false
]);
foreach
(
$cids
as
$cid
){
$contacts
[
$cid
][
'contribution_url'
]
=
$profileUrl
[
0
][
'value'
];
}
}
// FIND most recent SEPA Mandates (per contact)
...
...
This diff is collapsed.
Click to expand it.
cartable/settings/cartable.setting.php
+
26
-
0
View file @
3829d62a
...
...
@@ -81,6 +81,32 @@ return [
],
],
],
'cartable_profile_url'
=>
[
'name'
=>
'cartable_profile_url'
,
'type'
=>
'String'
,
'description'
=>
E
::
ts
(
'URL of profile page'
),
'default'
=>
''
,
'title'
=>
E
::
ts
(
'URL of profile page'
),
'html_type'
=>
'Text'
,
'settings_pages'
=>
[
'cartable'
=>
[
'weight'
=>
190
,
],
],
],
'cartable_join_url'
=>
[
'name'
=>
'cartable_join_url'
,
'type'
=>
'String'
,
'description'
=>
E
::
ts
(
'URL of membership page'
),
'default'
=>
''
,
'title'
=>
E
::
ts
(
'URL of join page'
),
'html_type'
=>
'Text'
,
'settings_pages'
=>
[
'cartable'
=>
[
'weight'
=>
200
,
],
],
],
'cartable_sud_documentation_url'
=>
[
'name'
=>
'cartable_sud_documentation_url'
,
'type'
=>
'String'
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets