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 export Price Sets
Pages: [1] 2

Author Topic: How to export Price Sets  (Read 3357 times)

shrill

  • Guest
How to export Price Sets
May 07, 2009, 05:51:42 pm
Hi all.

Okay, so my event uses a number of price sets with different events (it is a conference) broken down by type of registrant (full member, partial member etc.). In some cases, all members have the same price (all membership types).

When I view a registrant, or when I export the data, I only get a list of the membership types: e.g. Full Members,All membership types. I need to know exactly what they signed up for (e.g. the title of the individual price field).

I need to have the price field, along with the "Item". How can I determine this, and secondly how can I export it?

Thanks,

Shrill

p.s. if I were to go back in and change the price sets so as to make it obvious what the registrant was signing up for, a) would it mess up my registrations (considering they are already underway), and b) would it work on those registrants already in the system?
« Last Edit: May 07, 2009, 06:29:58 pm by shrill »

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: How to export Price Sets
May 07, 2009, 10:34:08 pm

There is a custom search for this, check:

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1

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

shrill

  • Guest
Re: How to export Price Sets
May 08, 2009, 12:11:34 pm
Quote from: Donald Lobo on May 07, 2009, 10:34:08 pm

There is a custom search for this, check:

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1

lobo


Okay, now I'm excited! Thank you. but I get this (both on the demo site and my own):
Sorry. A non-recoverable error has occurred.

Update: it works for me on the demo site now but not my own. I am working with Civicrm 2.07: is that the problem? Upgrading is on the cards, but it will be after this conference, so I need to find a way to do this with this version.

Could not get details for custom search

Return to home page.
« Last Edit: May 08, 2009, 05:45:47 pm by shrill »

shrill

  • Guest
Re: How to export Price Sets
May 08, 2009, 08:18:22 pm
Okay. So I've been trying to figure this out (tricky!).

I found this: http://wiki.civicrm.org/confluence/display/CRMDOC/events+aggregate+page which I think is possibly what I'm looking for?

I put the files mentioned where it says to put the files. Still having the same error when I go to my site's version of the URL you posted. I did find here: http://www.mysite.org/civicrm/admin/options/custom_search?group=custom_search&reset=1, a list of "Custom Search Options" which appears to include a number of provided searches. However, I am having difficulty finding anything about how to actually implement these searches, and I don't see anything to do with events in the list anyway.

Thanks for any help you can provide!

Shrill

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to export Price Sets
May 09, 2009, 09:38:28 am
Hi,

If you are using a version of CiviCRM that didn't ship with a custom search that you want to use you need to register the search

http://wiki.civicrm.org/confluence/display/CRMDOC/Custom+Search+Components - look for register your search. (A lot of the information on this page deals with writing searches)

You will also need to put the code files in the correct place. The code files are included if you download the latest release in this folder
civicrm\CRM\Contact\Form\Search\Custom and you also need files from the folder civicrm\templates\CRM\Contact\Form\Search\Custom

I don't know if any changes have been made to the schema that affect them between 2.0.7 and the latest version but you could start with the latest version and see if it works.

Note the csid in this line refers to the reports id number as entered by you into phpmyadmin
http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1
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

shrill

  • Guest
Re: How to export Price Sets
May 09, 2009, 05:41:34 pm
Thanks Eileen. I understand now!

Cheers,

Shrill

shrill

  • Guest
Re: How to export Price Sets
May 09, 2009, 06:46:38 pm
Okay. So I followed all of the instructions. Have confirmed the the files are in the right place. Got the next value (6) and registered the search. After doing that I was able to find it in the list. And thanks to your comment about the url, I can now get the other searches in the list to work.

However, I am still having the same problem: when I enter the right id for the search (eg. http://www.mysite.org/civicrm/contact/search/custom?csid=6&reset=1), I still get the same error.

Upon navigating to my user account, I am now also getting this:

Code: [Select]
warning: include_once(CRM/Contact/Form/Search/Custom/EventDetails.php) [function.include-once]: failed to open stream: No such file or directory in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.
warning: include_once() [function.include]: Failed opening 'CRM/Contact/Form/Search/Custom/EventDetails.php' for inclusion (include_path='.:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.
warning: include_once(CRM/Contact/Form/Search/Custom/EventDetails.php) [function.include-once]: failed to open stream: No such file or directory in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.
warning: include_once() [function.include]: Failed opening 'CRM/Contact/Form/Search/Custom/EventDetails.php' for inclusion (include_path='.:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.
warning: include_once(CRM/Contact/Form/Search/Custom/EventDetails.php) [function.include-once]: failed to open stream: No such file or directory in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.
warning: include_once() [function.include]: Failed opening 'CRM/Contact/Form/Search/Custom/EventDetails.php' for inclusion (include_path='.:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm:/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/BAO/SearchCustom.php on line 76.

Thoughts?

Shrill

shrill

  • Guest
Re: How to export Price Sets
May 09, 2009, 07:09:54 pm
p.s. in my civicrm.settings.php I have the following:

Code: [Select]
global $civicrm_root;

$civicrm_root = '/home2/mysitenet/public_html/new-website/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home2/mysitenet/public_html/new-website/files/civicrm/templates_c/' );



Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to export Price Sets
May 10, 2009, 06:26:26 pm
Hmm - I think that file is in

civicrm\templates\CRM\Contact\Form\Search\Custom

(note the extra 'templates'). It might be a version thing that it's not looking there - you could just copy it to where it is looking.

Custom templates directories are configured in Administer CiviCRM › Global Settings >Settings - Upload Directories

but I wouldn't have thought you'd need to use a custom template directory for this.
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

shrill

  • Guest
Re: How to export Price Sets
May 10, 2009, 08:01:46 pm
Quote from: Eileen on May 10, 2009, 06:26:26 pm
Hmm - I think that file is in

civicrm\templates\CRM\Contact\Form\Search\Custom

(note the extra 'templates'). It might be a version thing that it's not looking there - you could just copy it to where it is looking.

Custom templates directories are configured in Administer CiviCRM › Global Settings >Settings - Upload Directories

but I wouldn't have thought you'd need to use a custom template directory for this.

Okay. I am getting closer. I took another look in the CRM/Contact/Form/Search/Custom/EventDetails.php folder. The php file there is called EventAggregate.php. The other file is EventDetails.tpl. I've tried making a copy of EventAggregate.php and renaming it EventDetails.php and also have tried uploading EventDetails.tpl to that folder.

Now I get:
Fatal error: Class 'CRM_Contact_Form_Search_Custom_EventDetails' not found in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/Selector/Custom.php(149) : eval()'d code on line 1

Then I tried renaming EventDetails.tpl (in that folder) to EventDetails.php.

Now I get:
Code: [Select]
{* Template for "EventAggregate" custom search component. *} {assign var="showBlock" value="'searchForm'"} {assign var="hideBlock" value="'searchForm_show','searchForm_hide'"}
{ts}open section{/ts} {ts}Edit Search Criteria{/ts}
{ts}close section{/ts}{ts}Search Criteria{/ts} {* Loop through all defined search criteria fields (defined in the buildForm() function). *} {foreach from=$elements item=element} {/foreach}
{$form.$element.label} {$form.$element.html}
{ts}Event Type{/ts}
{foreach from=$form.event_type_id item="event_val"}
{$event_val.html}
{/foreach}
  {$form.buttons.html}
{if $rowsEmpty} {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} {/if} {if $rows} {* Search request has returned 1 or more matching rows. Display results and collapse the search criteria fieldset. *} {assign var="showBlock" value="'searchForm_show'"} {assign var="hideBlock" value="'searchForm'"}
{* The action task select and submit has been removed from this custom search because we're not dealing with contact records (so it won't work). *} {* This section displays the rows along and includes the paging controls *}

{include file="CRM/common/pager.tpl" location="top"} {include file="CRM/common/pagerAToZ.tpl"} {strip} {foreach from=$columnHeaders item=header} {/foreach} {counter start=0 skip=1 print=false} {foreach from=$rows item=row} {foreach from=$columnHeaders item=header} {assign var=fName value=$header.sort} {if $fName eq 'payment_amount' || $fName eq 'fee' || $fName eq 'net_payment'} {else} {/if} {/foreach} {/foreach}
{if $header.sort} {assign var='key' value=$header.sort} {$sort->_response.$key.link} {else} {$header.name} {/if}
{$form.$cbName.html} {$row.$fName|crmMoney}  {$row.$fName}
{/strip} {include file="CRM/common/pager.tpl" location="bottom"}
{* END Actions/Results section *} {/if}
Fatal error: Class 'CRM_Contact_Form_Search_Custom_EventDetails' not found in /home2/mysitenet/public_html/new-website/sites/all/modules/civicrm/CRM/Contact/Selector/Custom.php(149) : eval()'d code on line 1

Shrill

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to export Price Sets
May 10, 2009, 08:30:12 pm
Did you try renaming EventAggregate.php to EventDetails.tpl?
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

shrill

  • Guest
Re: How to export Price Sets
May 11, 2009, 09:20:53 am
Hmmm. Just tried that. We're back to

Sorry. A non-recoverable error has occurred.

Could not get details for custom search

Return to home page.

I've also tried both versions of the EventAggregate search listed on the page.

Shrill

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to export Price Sets
May 11, 2009, 01:12:56 pm
OK - I'm wondering if the search you are after is
http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1

or

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=7&reset=1

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: How to export Price Sets
May 11, 2009, 01:38:18 pm
Nb - I couldn't find a reference to eventDetails.php anywhere in my install maybe you could search for where the line CRM/Contact/Form/Search/Custom/EventDetails.php appears?

Within EventAggregate there should be
    function templateFile( ) {
       return 'CRM/Contact/Form/Search/Custom/EventDetails.tpl';
    }


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

shrill

  • Guest
Re: How to export Price Sets
May 11, 2009, 04:32:18 pm
Quote from: Eileen on May 11, 2009, 01:12:56 pm
OK - I'm wondering if the search you are after is
http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=9&reset=1

or

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=7&reset=1



Okay, both of these searches would probably be quite helpful. The first one in particular, but the second would be useful too.

How do I get them? Are they included in 2.2, and if so, can I just transfer the files over to 2.07?

Shrill

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • How to export Price Sets

This forum was archived on 2017-11-26.