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) »
  • Just a recurring payment option on contribution page
Pages: [1]

Author Topic: Just a recurring payment option on contribution page  (Read 1474 times)

kavita.s.shinde

  • Guest
Just a recurring payment option on contribution page
October 24, 2008, 05:36:13 am
hi,

To have just a recurring payment option on contribution page, smarty can be used with the help of regexp function in smarty, like that we can edit our page workflow 
just by changing the template file corresponding to that page, patch for getting just a recurring option in Main.tpl is as follows:

In custom_templates/CRM/Contribute/Form/Contribution/Main.tpl

{if $form.is_recur}
        <tr>
          <td class="labelempty">&nbsp;</td><td><strong>{assign var='preg2' value='$form.is_recur.html|regex_replace:"/(<input value.*<br \/>)/":"$1"}{$preg2|regex_replace:"/(name=\"is_recur\")/":"$1 checked=\"checked\""}{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}
                           </span>
                           </p>
           </td>
       </tr>
 {/if}

Instead of :
{if $form.is_recur}
        <tr>
          <td class="labelempty">&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}
                           </span>
                           </p>
           </td>
       </tr>
    {/if}

Thanks,
Kavita


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: Just a recurring payment option on contribution page
October 24, 2008, 01:13:17 pm
Would a screenshot of an example resulting page help convey what you have achieved?
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]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Just a recurring payment option on contribution page

This forum was archived on 2017-11-26.