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) »
  • Double-multiplier in priceset?
Pages: [1]

Author Topic: Double-multiplier in priceset?  (Read 428 times)

Vandalf

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 0
Double-multiplier in priceset?
August 31, 2012, 11:58:08 am
Umm.. I've searched about for this one, but it seems hard to find anything on it - which fritghtens me because I suppose that means that either:
- there is no good solution to it, or
- I'm just plain stupid.

None of those options really appeal to me, but I guess I'd rather go for the latter if I have to choose... ::)

Well, here goes. In my kayak club, our members can rent kayaks for days all up to a week in total. They can however, also rent as many as they like (we only got 12 available, so that's the max limit though).

So, what I'd like to do is this:
Create a contribution page where the member can input
- number of days they want to rent one or more kayaks
- number of kayaks

and then get out one price for this (= one payment).

Half-way is easy, I create a pricefield called "number of kayaks" and set it to multiply the price per kayak with the number that the user specifies. Easy-peacy. But now, how do I add number of days?? Is that possible?? Do I have to *tremble* use some javascript (black) magic???  :o

I used to have a good head of hair when I started doing CiviCRM, but I'm afraid it's getting thinner...  ;D

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Double-multiplier in priceset?
September 03, 2012, 04:49:30 am
Quote from: Vandalf on August 31, 2012, 11:58:08 am
Do I have to *tremble* use some javascript (black) magic???  :o

I think so. No need to tremble per se, but a bit of coding sounds in order. :)
 
Note, however, that JS coding may cause more hair loss than CiviCRM. ;)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Vandalf

  • I post occasionally
  • **
  • Posts: 45
  • Karma: 0
Re: Double-multiplier in priceset?
September 03, 2012, 06:20:43 am
Quote from: Hershel on September 03, 2012, 04:49:30 am
Note, however, that JS coding may cause more hair loss than CiviCRM. ;)
Exactly, that's why I'm trembling...  ;)

Verywell, I'll see what I can manage using a hairnet. Thanks Hershel!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Double-multiplier in priceset?
September 03, 2012, 07:21:05 am
Note of course that you can use an "extra" template:

http://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates

and you only need to learn jQuery, not pure JS in reality. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Double-multiplier in priceset?

This forum was archived on 2017-11-26.