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) »
  • Gift a Membership upon Member Signup / Renewal with Relationship
Pages: [1]

Author Topic: Gift a Membership upon Member Signup / Renewal with Relationship  (Read 682 times)

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Gift a Membership upon Member Signup / Renewal with Relationship
February 10, 2015, 10:06:41 am
Any creative ideas?

We want to offer a 'free give away membership' for those choosing our $100+ membership option.

That person would be able to give away the extra membership to someone else.

Current idea includes manually creating CiviDiscount code and emailing it to the original member, then manually making a relationship between them and the new member who later signs up by looking at the code. Lots of manual labor.

Any other clever ideas?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 10, 2015, 10:48:26 am
I guess the "low tech" way to do it would be to create a single discount code and ask/trust people to not share it or use it more than once. If you only have a small number of donors then it's easy to monitor.
Try asking your question on the new CiviCRM help site.

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 11, 2015, 11:04:15 am
Implementing low-tech way:

Is there a way I could put the generic discount code on the receipt of my contribution page, but only for people who choose the membership level of $100+?


joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 11, 2015, 02:25:48 pm
You should be able to modify the membership -receipt (online) template to do that. ( Mailings>message template>system workflow messages)

If the 100+ option is a membership type then you include text  prefacing  it with {if $membership_name eq "100+ membership name"}

if it is just a price option for a common membership type then it would be easy to include the code where the items purchased are listed ie in the section that begins     {if $useForMember && $lineItem}       {foreach from=$lineItem item=value key=priceset} as you could include something like:
 
{if $line.label eq '100+ membership name'} {$line.label} - {ts}Your discount code is XXXXXX.{/ts}

If you want to put it somewhere else you will need a better understanding of how the receipts are put together and of smarty logic.


zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 14, 2015, 11:35:54 am
Thanks a ton, I'll see what I can do with this information!

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 14, 2015, 01:54:30 pm
Quote from: Coleman Watts on February 10, 2015, 10:48:26 am
I guess the "low tech" way to do it would be to create a single discount code and ask/trust people to not share it or use it more than once. If you only have a small number of donors then it's easy to monitor.

Out of curiosity what would the high tech way be?  ;D

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 14, 2015, 02:47:06 pm
That would involve writing some custom code.
You could use the CiviDiscount api to generate a new one-time use discount code and insert it into the email (or maybe just generate a separate email) to donors who have given an amount over the threshold.
Try asking your question on the new CiviCRM help site.

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 26, 2015, 11:32:42 am
Quote from: joanne on February 11, 2015, 02:25:48 pm
You should be able to modify the membership -receipt (online) template to do that. ( Mailings>message template>system workflow messages)

If the 100+ option is a membership type then you include text  prefacing  it with {if $membership_name eq "100+ membership name"}

if it is just a price option for a common membership type then it would be easy to include the code where the items purchased are listed ie in the section that begins     {if $useForMember && $lineItem}       {foreach from=$lineItem item=value key=priceset} as you could include something like:
 
{if $line.label eq '100+ membership name'} {$line.label} - {ts}Your discount code is XXXXXX.{/ts}

If you want to put it somewhere else you will need a better understanding of how the receipts are put together and of smarty logic.


I have this code and I get the receipt but its not printing the Discount Code.

Membership Level - Suggested Membership Contribution - Full (Journal by Mail) - this is the line item I see when doing a test contribution. I have a membership price set, selecting a membership type, and adjusting its fee to be higher.

Code: [Select]
   {if $useForMember && $lineItem and !$is_quick_config}
       {foreach from=$lineItem item=value key=priceset}
       
          <tr>
         <td colspan="2" {$valueStyle}>
          <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
           <tr>
            <th>{ts}Item{/ts}</th>
            <th>{ts}Fee{/ts}</th>
      <th>{ts}Membership Start Date{/ts}</th>
      <th>{ts}Membership End Date{/ts}</th>
           </tr>
   
           {foreach from=$value item=line}
             <tr>
             <td>
             {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
             {if $line.label eq 'Membership Level - Suggested Membership Contribution - Full (Journal by Mail)'} {$line.label} - {ts}Your discount code is XXXXXX.{/ts} {/if}
            </td>
             <td>
              {$line.line_total|crmMoney}
             </td>
             <td>
              {$line.start_date}
             </td>
       <td>
              {$line.end_date}
             </td>
            </tr>
           {/foreach}
          </table>
         </td>
        </tr>   


       {/foreach}
       {/if}

zkrebs

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 1
Re: Gift a Membership upon Member Signup / Renewal with Relationship
February 26, 2015, 12:11:35 pm
What I have working now is a Rule using CiviCRM Entity / Rules, when a Membership with my ID is created, load the user's main email, and send them an email with the code, separate from the receipt. This worked out easier.

Now..would be totally cool if there was a CiviDiscount rules Action to send an email with a 1-time use code :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Gift a Membership upon Member Signup / Renewal with Relationship

This forum was archived on 2017-11-26.