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 CiviMember (Moderator: Deepak Srivastava) »
  • Membership One-Click New/Renew Templates
Pages: [1]

Author Topic: Membership One-Click New/Renew Templates  (Read 2191 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Membership One-Click New/Renew Templates
April 10, 2008, 10:54:27 am
I had hoped the transaction ID and notes fields would be included in the new/renew member record contribution screens, as those are important fields to gather info on when processing memberships+contributions through the admin (check numbers, etc). Unfortunately they're not, and the fields are also not available to smarty templates.

I have a hard time tracing back to the queries that get passed to the smarty templates. Anyone know where those queries are defined so that I can add and pass through that field?

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Membership One-Click New/Renew Templates
April 10, 2008, 11:08:32 am
Nevermind, got it (I was being lazy before).

Any chance we can have these added to the one-step forms in the future? At least the transaction ID. That's an important one for handling offline payments.

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Membership One-Click New/Renew Templates
April 10, 2008, 11:14:18 am
Brian - adding "Transaction ID" to these forms is on the 2.1 roadmap. How critical is also adding the Notes field? (We can consider adding all the available fields for a contribution - but the offline membership signup / event registration forms are already huge and daunting.)

If you want to do the work to add Transaction ID and Notes now (in 2.0) - the form is built in CRM/Member/Form/Membership.php. Check the results of CRM_Contribute_BAO_Contribution::getValues( $contributionParams, $defaults, $contributionIds ); in that file to see what contribution data is being pulled into setDefaults. And, you'd add your field(s) in the buildQuickform() function as well as referencing them in the associated tpl.
Protect your investment in CiviCRM by  becoming a Member!

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Membership One-Click New/Renew Templates
April 10, 2008, 11:52:41 am
I don't think the notes field is necessary. But if it's easy enough to pass the fields to the template, might be nice to give people the option of adding it if they want. But I understand if you're concerned that unnecessarily bogs down the code.

Not sure what I'm doing wrong with the Membership.php file. I added the field to the buildQuickForm function, also to the record contribution array (and template). Field shows up on the form, but the value isn't saved.

quickform:
Code: [Select]
$this->add('text', 'trxn_id', ts('Transaction ID'));
I don't need a default value so ignored that section. Should I add code to that section anyway?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Membership One-Click New/Renew Templates
April 10, 2008, 12:29:22 pm
Strange. I had no problem adding it to the membershiprenewal.php /.tpl files, and it's working fine. But it won't save the value on the new membership form. They look to be structured the same. Anything weird about the membership.php?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Membership One-Click New/Renew Templates
April 10, 2008, 03:57:25 pm
Lobo found what was missing --

CRM/Member/BAO/Membership.php
around line 238
add 'trxn_id' to the array

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership One-Click New/Renew Templates

This forum was archived on 2017-11-26.