Skip to content

Commit

Permalink
Merge pull request #11303 from jitendrapurohit/CRM-21190
Browse files Browse the repository at this point in the history
CRM-21190 - Warning message on Thankyou page on pay later membership pr…
  • Loading branch information
eileenmcnaughton authored Nov 23, 2017
2 parents 87ea20c + 376b971 commit b239a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CRM/Contribute/Form/Contribution/ThankYou.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function preProcess() {

$this->_params = $this->get('params');
$this->_lineItem = $this->get('lineItem');
$this->_useForMember = $this->get('useForMember');
$is_deductible = $this->get('is_deductible');
$this->assign('is_deductible', $is_deductible);
$this->assign('thankyou_title', CRM_Utils_Array::value('thankyou_title', $this->_values));
Expand Down
6 changes: 4 additions & 2 deletions CRM/Contribute/Form/ContributionBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ public function cancelRecurring() {
* @param bool $isContributionMainPage
* Is this the main page? If so add form input fields.
* (or better yet don't have this functionality in a function shared with forms that don't share it).
* @param int $selectedMembershipTypeID
* @param int|array $selectedMembershipTypeID
* Selected membership id.
* @param bool $thankPage
* Thank you page.
Expand Down Expand Up @@ -1240,7 +1240,9 @@ protected function buildMembershipBlock(

// Assign autorenew option (0:hide,1:optional,2:required) so we can use it in confirmation etc.
$autoRenewOption = CRM_Price_BAO_PriceSet::checkAutoRenewForPriceSet($this->_priceSetId);
if (isset($membershipTypeValues[$selectedMembershipTypeID]['auto_renew'])) {
//$selectedMembershipTypeID is retrieved as an array for membership priceset if multiple
//options for different organisation is selected on the contribution page.
if (is_numeric($selectedMembershipTypeID) && isset($membershipTypeValues[$selectedMembershipTypeID]['auto_renew'])) {
$this->assign('autoRenewOption', $membershipTypeValues[$selectedMembershipTypeID]['auto_renew']);
}
else {
Expand Down

0 comments on commit b239a2d

Please sign in to comment.