CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Member price sets & prefilled information
Pages: 1 [2]

Author Topic: Member price sets & prefilled information  (Read 4883 times)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Member price sets & prefilled information
October 06, 2011, 11:03:40 am
Hi Merlise,
The setDefaults logic for the online contribution page is all in CRM/Contribute/Form/Contribution/Main.php. Esp chk lines 298-318 for setting defaults in membership price set block.

If you want to try adding a form rule that prevents folks from renewing an existing lifetime membership - you would add that to the formRule() function in that same file.

buildMembershipBlock in CRM/Member/BAO/Membership.php (starting line 649) builds the form fields for the membership section of the online contribution page. The issue u mentioned w/ existing lifetime memberships not showing up is probably in that function since it builds the $membershipTypes array which the template (next paragraph) uses to display existing / expired membership info the logged in user.

The template that displays info about current/expired memberships (above the price set fields) when a logged in user accesses online contribution page and they have memberships:  templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl (lines 50-62).

Ping us on IRC if you need more....
Protect your investment in CiviCRM by  becoming a Member!

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Member price sets & prefilled information
October 06, 2011, 05:36:46 pm
Thanks!!!  I'll see how far I can get :-)

m
Merlise Clyde

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Member price sets & prefilled information
October 06, 2011, 08:33:56 pm
In CRM/Member/BAO/Member.php on line 732 there is

          $mem['current_memberships'] = $membership->end_date;

But later on line 759 it is
   
         $memType['current_memberships'] = $membership->end_date;

should the first also be $memType ?

(doesn't fix the problem but couldn't find def of $mem elsewhere
Merlise Clyde

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Member price sets & prefilled information
October 06, 2011, 09:09:25 pm
In building the MemberTypes array all past memberships are included but have no endate (see screen shot)  (membershships not in green block

Previous membership do not have an end date (not sure why,  feature of upsell?)  nor do lifetime memberships , so the code in MembershipBlock.tpl around line  50 of MembershipClock.tpl treats all past memberships and lifetime memberships the same; hence they are not printed out.

Checking is_active does not catch the most recent membership.  And since none of them have an end date sorting doesn;t help.




Merlise Clyde

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Member price sets & prefilled information
October 07, 2011, 01:32:06 pm
Merlise - I fixed the status display for price sets under the original issue. Would be great if you could QA it ASAP since we are releasing 3.4.7 early next week:

http://issues.civicrm.org/jira/browse/CRM-8990

I pushed the remaining piece about setting defaults to 4.2:
http://issues.civicrm.org/jira/browse/CRM-9001

But if you can make progress on it in the next week or so we can push it back to 4.1. I've sent mail asking Yash on our team to check on those variables (mem and memTypes).
Protect your investment in CiviCRM by  becoming a Member!

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Member price sets & prefilled information
October 07, 2011, 06:43:23 pm
Thanks Dave!

I'm out of town until Monday night - I'll see if I can QA over the weekend, but it may be Tuesday before I get to it as my access is limited at the moment.

I'm guessing the fix with the display may help with the prefill so will continue to explore (although it is probably a very quick fix for Yash who's is familar with the structures :-)  Will help in any way I can :-)

I did notice that a fixed term membership added after a rolling lifetime membership had the wrong start/ end data (used the start date of the rolling membership  rather than the fixed length membership.  since we have all fixed term memberships, with the only rolling being a terminal lifetime membership this isn't likely to impact us, but may affect others.  I'll try to test on the sandbox and file a separate issue if this is a real problem.
Merlise Clyde

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Member price sets & prefilled information
October 09, 2011, 11:16:00 pm
Quote from: mclyde on October 06, 2011, 08:33:56 pm
In CRM/Member/BAO/Member.php on line 732 there is

          $mem['current_memberships'] = $membership->end_date;

But later on line 759 it is
   
         $memType['current_memberships'] = $membership->end_date;

should the first also be $memType ?

(doesn't fix the problem but couldn't find def of $mem elsewhere

Yes....fixed the typo.

Thanks for catching this!
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Member price sets & prefilled information
August 07, 2012, 08:11:11 pm
Would one of you clarify if Description is now showing for eg Radio Price Set Options.

Not seeing it on a Joomla site we very occassionally have to help on. v 3.4.8
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Member price sets & prefilled information

This forum was archived on 2017-11-26.