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 CiviContribute (Moderator: Donald Lobo) »
  • Default Recurring
Pages: [1]

Author Topic: Default Recurring  (Read 1383 times)

orthodoxkohen

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 2
Default Recurring
July 12, 2009, 12:55:59 pm
I would like my recurring donation form to only allow monthly frequency and unlimited occurances.  the way my form looks now is below(http://www.yesmilwaukee.org/images/stories/ScreenShot1.jpg)

Would like to remove the checkbox for 1 time donation and leave the month dropdown out as well as the installment box gone.  Replace with defaults I mentioned above.

Any help in how to proceed would be greatly appreciated.

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Default Recurring
July 12, 2009, 07:52:39 pm

I suspect you can do the below by using the buildFrom hook for that page and overwrite the elements that CiviCRM introduces

In specific you will override the elements

is_recur
installments
frequency_unit
frequency_interval

and replace them with either new elements or hidden form values. I dont think paypal standard allows an unlimited number of payments

you'll need to be familiar with php, civicrm and the drupal hook architecture to do the needful. I've not tried it, but i do think it will work :)

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

orthodoxkohen

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 2
Re: Default Recurring
July 14, 2009, 08:32:16 pm
I found this code
Code: [Select]
{if $form.is_recur}
<tr valign="top">
<td>&nbsp;</td>
<td><strong>{$form.is_recur.html} {ts}every{/ts} &nbsp;{$form.frequency_interval.html} &nbsp; {$form.frequency_unit.html}&nbsp; {ts}for{/ts} &nbsp; {$form.installments.html} &nbsp;{$form.installments.label}</strong><br />
<p><span class="description">{ts}Your recurring contribution will be processed automatically for the number of installments you specify. You can leave the number of installments blank if you want to make an open-ended commitment. In either case, you can choose to cancel at any time.{/ts}
{if $is_email_receipt}
{ts}You will receive an email receipt for each recurring contribution. The receipts will include a link you can use if you decide to modify or cancel your future contributions.{/ts}
{/if} </p>
</td>
</tr>
{/if}

in templates/CRM/Contribute/Form/Contribution/Main.tpl

Is this the place where I would do this?

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Default Recurring
July 14, 2009, 09:35:09 pm

You will also need to modify the

CRM/Contribute/Form/Contribution/Main.php

In general we do recommend that you use hooks (http://api.drupal.org/api/group/hooks) and customized templates to modify things rather than make changes to the core. If you are not familiar with hooks/php/templates, you might want to consider hiring someone from http://civicrm.org/professional/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

orthodoxkohen

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 2
Re: Default Recurring
July 15, 2009, 08:39:51 pm
Is there a tutorial about how to use hooks and buildForm functions?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Default Recurring
July 15, 2009, 09:09:12 pm

There is no tutorial per se, but there are a fair number of samples.

civitest.module.sample (included in all distro's)
http://svn.civicrm.org/tools/trunk/drupal/modules/multicurrency/

are places where u can see some sample and real code :) Note that you do need decent expertise with PHP / Drupal to make reasonable progress

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

orthodoxkohen

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 2
Re: Default Recurring
July 16, 2009, 04:20:42 pm
Thanks for the tip.  I've been looking for some professional services, but so far it looks like my luck is that everyone on the list is busy.

 :P

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Default Recurring
July 16, 2009, 09:26:39 pm

might want to contact claudian at webaccess.co.in if u need some professional services

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Default Recurring

This forum was archived on 2017-11-26.