$this->set('values', $this->_values);
$this->set('fields', $this->_fields);
}
- $this->assign('isShowMembershipQuickConfigBlock', $this->isShowMembershipQuickConfigBlock());
+ $this->assign('isShowMembershipBlock', $this->isShowMembershipBlock());
$this->set('membershipBlock', $this->getMembershipBlock());
// Handle PCP
/**
* Should the membership block be displayed.
*
- * This should be shown when the price set is quick config and is a membership price set.
+ * This should be shown when a membership is available to purchase.
+ *
+ * It could be a quick config price set or a standard price set that extends
+ * CiviMember.
+ *
* @return bool
*/
- protected function isShowMembershipQuickConfigBlock(): bool {
- return CRM_Core_Component::isEnabled('CiviMember') && $this->getMembershipBlock() && $this->isQuickConfig();
+ protected function isShowMembershipBlock(): bool {
+ return CRM_Core_Component::isEnabled('CiviMember') && $this->getMembershipBlock();
}
/**
<div class="help">{ts}You have a current Lifetime Membership which does not need to be renewed.{/ts}</div>
{/if}
- {if $isShowMembershipQuickConfigBlock && !$ccid}
+ {if $isShowMembershipBlock && !$ccid}
<div class="crm-public-form-item crm-section">
{include file="CRM/Contribute/Form/Contribution/MembershipBlock.tpl" context="makeContribution"}
</div>
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if $isShowMembershipQuickConfigBlock}
+{if $context EQ "makeContribution"}
<div id="membership" class="crm-group membership-group">
- {if $context EQ "makeContribution"}
+
<div id="priceset">
<fieldset>
{if $renewal_mode}
<div class="display-block">
{include file="CRM/Price/Page/LineItem.tpl" context="Membership"}
</div>
- {/if}
+
</div>
{literal}
<script type="text/javascript">