-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify isPrimary, isPaidEvent variables #26283
Conversation
(Standard links)
|
@@ -152,15 +152,14 @@ | |||
{if !empty($lineItem)} | |||
{foreach from=$lineItem item=value key=priceset} | |||
{if $value neq 'skip'} | |||
{if !empty($isPrimary)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is within the same criteria in a loop - so can go
I think we can remove isPrimary here as well, because that also sends an event_offline_receipt. |
$this->assignEventDetailsToTpl($params['event_id'], CRM_Utils_Array::value('role_id', $params), CRM_Utils_Array::value('receipt_text', $params), $this->_isPaidEvent); | ||
|
||
$this->assignEventDetailsToTpl($params['event_id'], CRM_Utils_Array::value('role_id', $params), CRM_Utils_Array::value('receipt_text', $params)); | ||
$this->assign('isPrimary', (int) $this->_isPaidEvent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? I don't think it is used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it would still be present in people's templates if they haven't updated on upgrade - but I think I could comment to that effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, good idea
@@ -28,12 +28,12 @@ | |||
|
|||
{if !empty($isOnWaitlist)} | |||
<p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p> | |||
{if !empty($isPrimary)} | |||
{if {event.is_monetary|boolean}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with how the wait list system works, but do participants get registered automatically if space becomes available in the event if the event is non-monetary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larssandergreen yeah I think that must be the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the docs and tested. You do get an email with a link that you have to click to move from waitlist to registered, even for a free event. I think this was probably, as you say, copied from the online template, where it was supposed to prevent additional participants from getting emails (it only emails the primary participant to confirm for all participants in the group). Same for approval. So I think we can remove both these conditionals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the investigation - I have pushed up a fix to remove them! Yay for simplification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any message template simplification is a happy occasion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are so right @larssandergreen
d90a00b
to
3f7be68
Compare
@larssandergreen thanks for the thoughtful review - and in particular picking up the fee selection form - I have made some updates to that form as well now to ensure it can resolve contribution tokens |
558a85f
to
06a2ea7
Compare
Error doesn't feel caused by this Found CiviCRM database version 4.6.36. In UpgradeDbCommand.php line 64: [Exception] Exception trace: |
test this please |
@larssandergreen this is passing now - is it good to merge in your opinion? |
Otherwise, all good. |
06a2ea7
to
a7c0277
Compare
@larssandergreen OK- I think I fixed that - this form overloading is crazy |
I know, it's nuts. |
thanks @larssandergreen - I spotted a few notices in the register flow too which I might look at @colemanw can you merge this? |
merging based on Lars's review |
thanks @seamuslee001 & thanks @larssandergreen ! |
Overview
Clarify isPrimary, isPaidEvent variables
Before
The event_offline receipt has big conditionals around the mystery
$isPrimary
variable - the meaning of which is unclearOn digging through the code I concluded this was largely copy & paste from the online template & in the offline template it actually means 'event is monetary' - it is assigned to the template when event.is_monetary is true. It is also assigned when in credit card mode - but that is only the case when event.is_monetary is true.
Preview is very limited
After
isPrimary assignment is clearly based on event.is_monetary at the form level & within the template is replaces with the token
{event.is_monetary|boolean}
This makes MORE (but still not all) of the template preview-able
Technical Details
Comments