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) »
  • Applying membership discount
Pages: [1]

Author Topic: Applying membership discount  (Read 1270 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+
Applying membership discount
August 04, 2009, 05:57:52 am
I'm looking to apply a discount to a membership fee on a contrib page. using some javascript to calculate the discount (based on the value of a profile field). but i'm not sure how to pass the calculated result to the form. ideas?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Applying membership discount
August 04, 2009, 06:48:04 am
lcdweb:

You might want to write a hook for applying discounts to membership fees as has been done on the basis of membership type.
You might also want to take a look at http://issues.civicrm.org/jira/browse/CRM-4264

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

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: Applying membership discount
August 04, 2009, 07:02:05 am
hey Yash, how are things.

yeah -- I noticed there's a hook in v3.0 to assist with this. but it looks too messy to try to backport. i'm handling the javascript directly in the .tpl file, so I was hoping there was a way to easily pass the value within the template file.

where is the value of the membership fee actually calculated?

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

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Applying membership discount
August 06, 2009, 06:56:49 am
Doing great, how about you Brian?

Quote
where is the value of the membership fee actually calculated?

Check $memFee in CRM/Contribute/Form/Contribution/Main.php around line no 834. The tpl file which you may want to look at is templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl where you could write your js to do the needful.

You might also want to check http://forum.civicrm.org/index.php/topic,8501.msg36790.html#msg36790 where something similar has been done for event registration.

Hope that helps!
Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Applying membership discount

This forum was archived on 2017-11-26.