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) »
  • Discount on Price Field
Pages: [1]

Author Topic: Discount on Price Field  (Read 2093 times)

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Discount on Price Field
August 19, 2013, 01:03:29 pm
So I've got another fancy scenario. I need to take my pricefield in my membership priceset and make it where if someone enters a quantity of 10-20, I give a discount, 20-50, a greater discount, and 50+ an even greater discount. I'm not sure how to accomplish this using hooks or if there is a way I can do it via javascript or what not... It seems from reading the code that the total is recalculated on the backend so I'm pretty sure the javascript idea wouldn't work. postProcess hook is after authroize.net happens as well...

Any ideas?

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Re: Discount on Price Field
August 20, 2013, 01:45:40 pm
Ok so I'm not getting any bites so maybe I didn't explain what I want to do...

So I have a form with a price field that allows me to enter quantity. I would like to be able to make the unit price (which I enter at the time I set the price field up), to be variable based on the quantity that I type in.

I would like for this to show up on the the receipts and the confirmation page as well. Anyone know how I can change the unit price in a way it will stick?

I did find some updated documentation that may help me... http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Discount on Price Field
August 20, 2013, 04:42:07 pm
I don't think there's any out of the box solution yet for volume based pricing. You could potentially look at enhancing the existing CiviDiscount extension to add volume-based pricing (http://civicrm.org/extensions/cividiscount-extension ), or just build a simple extension using a hook to adjust unit pricing.

http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension
Protect your investment in CiviCRM by  becoming a Member!

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Re: Discount on Price Field
August 21, 2013, 06:01:42 am
Dude!
it's tidbits like this that I miss when I'm trying to find all the documentation I can on stuff...

Sometimes it's knowing what questions to ask to get going so that you get a place to look. Thanks for the help!

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

This forum was archived on 2017-11-26.