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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Price set to depend on variable "Country"
Pages: [1]

Author Topic: Price set to depend on variable "Country"  (Read 749 times)

mpeirano

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Joomla 2.5
  • MySQL version: 5.0.95-community
  • PHP version: 5.2.17
Price set to depend on variable "Country"
September 19, 2012, 03:19:37 pm
Hi,

I need to register users, collect their data with a profile and then present them with the contribution page. The contribution page need to have a diferente price set depending on the country (high, middle, low income coutries, as it stands). The contribution page is identical, except for the prices of the membership fee.

We are new to CiviCRM. I thought it would be easy to collect the data with a script and then call the appropriate contribution page, but it seems Joomla gets in the way. We are now looking at using a hook. Any suggestions?

cheers
Miguel Peirano

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Price set to depend on variable "Country"
September 20, 2012, 01:29:48 pm
Quote from: mpeirano on September 19, 2012, 03:19:37 pm
We are new to CiviCRM. I thought it would be easy to collect the data with a script and then call the appropriate contribution page, but it seems Joomla gets in the way. We are now looking at using a hook. Any suggestions?

Look at hook_civicrm_post
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.

mpeirano

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Joomla 2.5
  • MySQL version: 5.0.95-community
  • PHP version: 5.2.17
Re: Price set to depend on variable "Country"
September 20, 2012, 02:59:42 pm
Thanks,

what would you have it do?

Miguel

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Price set to depend on variable "Country"
September 21, 2012, 05:30:00 am
You could have it redirect to the correct page, as you mentioned.
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.

mpeirano

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Joomla 2.5
  • MySQL version: 5.0.95-community
  • PHP version: 5.2.17
Re: Price set to depend on variable "Country"
September 25, 2012, 10:54:14 pm
Not according to the documentation. There is no token for "country" and I can see no action for opening a url based on these criteria. Could you be more specific?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Price set to depend on variable "Country"
September 26, 2012, 02:11:40 pm
If Country is not in the variables passed to the hook (it should be however--try using print_r on the variables passed in) then you can always use $_POST to get it.
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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Price set to depend on variable "Country"

This forum was archived on 2017-11-26.