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) »
  • Best Way to Import Event Fee?
Pages: [1]

Author Topic: Best Way to Import Event Fee?  (Read 1606 times)

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Best Way to Import Event Fee?
March 10, 2009, 02:10:27 pm
Hi,

I'm nearly finished with an Event Import module (it's a hack but i'll share the code with anyone who wants it).
It's using Civi 2.2 and handles Events, Tell a Friend, Location & CiviAddress, Extra info (profile).

What i can't figure out, is there a way to import Fees?? We have sliding scale events and it'd be great to create two records for the Fees during import.

I know this involves the civicrm_option_value and civicrm_option_group tables, but are there others? Is there a hidden API for this??

thanks,
m

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Best Way to Import Event Fee?
March 10, 2009, 02:31:22 pm

1. how do u decide which scale to charge the user? we have "an early bird" discounting scheme that stores two copies of the fees and uses one based on the date

2. check: CRM/Event/Form/ManageEvent/Fee.php, line 582 or so for how to use an internal function to create the option group/value pair

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: Best Way to Import Event Fee?
March 10, 2009, 02:50:42 pm
sweet!
thanks much Lobo,
that's perfect.
m

ps - the current csv file we're importing from has high/low sliding scale data, which we interpret for fee structures...

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: Best Way to Import Event Fee?
March 11, 2009, 09:31:52 am
Hi All,

i managed to import event Fees, but not in the most elegant way (as Lobo suggested previously in this thread).

what i did was to create a new civicrm_option_group record, using as the 'name' field the value "civicrm_event.amount.EVENTID" (with the actual event ID in there).

then, taking the primary key from that newly created row, i inserted the corresponding civicrm_option_value records (two in our case. one for sliding scale upper and one for lower).

it appears to be working correctly.

did i miss anything? if not, give it a try if you need to import event fees.

thx,
m

julianbrelsford

  • I’m new here
  • *
  • Posts: 28
  • Karma: 2
Re: Best Way to Import Event Fee?
April 15, 2009, 02:28:34 pm
marqpdx - i'm interested in trying out your event import module to see if it'll import a list of 300+ past events. I sent you a private message.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Best Way to Import Event Fee?
April 15, 2009, 06:49:21 pm
I'm also interested in this module - perhaps you could document it in the code snippets part of the wiki?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: Best Way to Import Event Fee?
April 23, 2009, 04:00:06 pm
hi all,

i finally got back onto this project, and posted a wiki page on importing events, which includes importing event fees.
it is at:
http://wiki.civicrm.org/confluence/display/CRMDOC/Importing+Events

it works well for me!

many smiles,
m

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Best Way to Import Event Fee?

This forum was archived on 2017-11-26.