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 CiviEvent (Moderator: Yashodha Chaku) »
  • how to add a multiplier for a price set ?
Pages: [1]

Author Topic: how to add a multiplier for a price set ?  (Read 811 times)

nealzarka

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: civicrm 4
  • CMS version: drupal 7
  • MySQL version: 5.0.92-community-log
  • PHP version: 5.2.9
how to add a multiplier for a price set ?
June 30, 2011, 07:17:49 pm
i make a price set for hotel reservation, then the should choose a select field number of nights how can i do that ?

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: how to add a multiplier for a price set ?
July 01, 2011, 11:19:18 pm
not easily, is the unfortunate short answer.

Assuming the number of days would be a reasonable amount between, say, 1 and 9, you could write some fancy jQuery.

This jQuery would allow someone to type in a number of days and then hidden behind the scenes it would select a payment amount equal to the days selected.  This would take a programmer a few hours to accomplish.

Otherwise you could just setup some options that look like this:

( ) 1 night $80
( ) 2 nights $160
( ) 3 nights $240
etc etc etc

While not as graceful as what you propose, it is easy to do and requires no jQuery.  good luck.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

nealzarka

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: civicrm 4
  • CMS version: drupal 7
  • MySQL version: 5.0.92-community-log
  • PHP version: 5.2.9
Re: how to add a multiplier for a price set ?
July 04, 2011, 12:41:21 am
actually yes that's what i've done, and to separate this kind of label i did use the condition if help is there, put nights at the end of the line, im just a webdesigner trying to do the best with my artistique brain :D but you know what it works !

thanks for reply !

nealzarka

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: civicrm 4
  • CMS version: drupal 7
  • MySQL version: 5.0.92-community-log
  • PHP version: 5.2.9
Re: how to add a multiplier for a price set ?
July 04, 2011, 12:45:59 am
here is the result  ;D

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: how to add a multiplier for a price set ?
July 05, 2011, 10:14:36 am
I learned something and may have steered you incorrectly.

There is a field type in Price Sets called "   Text / Numeric Quantity" which allows you to set a value (like $80/night) and multiply that by the number the user inputs.  check it out.  I didn't know this existed until today, but wanted to update you.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

nealzarka

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: civicrm 4
  • CMS version: drupal 7
  • MySQL version: 5.0.92-community-log
  • PHP version: 5.2.9
Re: how to add a multiplier for a price set ?
July 05, 2011, 06:42:03 pm
thats what i used, and then just add "night" if the field help is filled

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • how to add a multiplier for a price set ?

This forum was archived on 2017-11-26.