Answers.Body: <p>Price-sets are referenced by events and contribution pages.  They are independent from events but can be referenced by them.  They are similar to locations or option-sets - if you delete one then anything refering to it will be unreferenced. You can use the API (or API-explorer) to delete them faster than the UI but be very careful with SQL as you can break a lot if you are not careful.</p>
  <ol>
  <li>No, there is no need to duplicate price sets, but it may be convenient</li>
  <li>Safest way is to de-reference a price set and then delete it (or delete old events that refer to it.)</li>
  <li>API, extension or (in drupal) using <a href="https://www.drupal.org/project/civicrm_entity" rel="nofollow noreferrer">civicrm_entity</a> you can create rules or bulk editing via views (ask as a separate question if you need help.)</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-26T16:12:03.213Z
Answers.Text: Sonicthoughts - when you mention de-referencing are you saying remove from the link table (civicrm_price_set_entity)?
Answers.UserDisplayName: Lesley Evensen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-10-07T01:56:45.540Z
Answers.LastActivityDate: 2024-09-25T16:04:56.150Z
Answers.LastEditDate: 2024-09-25T16:04:56.150Z
Answers.UserDisplayName: Sonicthoughts
Body: <p>I have CiviCRM deployment in which many events are created each week with unique price-sets. The staff using the back-end often goes in and makes typos, edits, and generally tweaks price-sets often. Each time they make an edit, the price-set is saved as a copy, and they piling up in a serious way.</p>
  <p>The price-set listing page takes minutes to load, and has no pager, and the drop down to select a price-set in the Event Configuration page is becoming quite unusable.</p>
  <p>Some questions:</p>
  <ol>
  <li>Is it necessary for Price sets to be duplicated on each edit?</li>
  <li>Can price sets be deleted without consequence to the events, registrations, and payments (IE, how do price sets work?)</li>
  <li>Is there a &quot;safe&quot; way to purge these old, unused price-sets, without having to go through each one, perhaps via direct DB manipulation? We would be willing to simply purge all price sets if we could do it without losing event,registration,payment data.</li>
  </ol>
  <p>Any ideas would be much appreciated!</p>
  
Tags: <civievent><price-sets>
Title: Price-set Overload!
ThreadText: # Price-set Overload!
  
  (Asked by: username_0 on 2015-10-06)
  
  I have CiviCRM deployment in which many events are created each week with unique price-sets. The staff using the back-end often goes in and makes typos, edits, and generally tweaks price-sets often. Each time they make an edit, the price-set is saved as a copy, and they piling up in a serious way.
  
  The price-set listing page takes minutes to load, and has no pager, and the drop down to select a price-set in the Event Configuration page is becoming quite unusable.
  
  Some questions:
  
  1. Is it necessary for Price sets to be duplicated on each edit?
  2. Can price sets be deleted without consequence to the events, registrations, and payments (IE, how do price sets work?)
  3. Is there a "safe" way to purge these old, unused price-sets, without having to go through each one, perhaps via direct DB manipulation? We would be willing to simply purge all price sets if we could do it without losing event,registration,payment data.
  
  Any ideas would be much appreciated!
  
  **Tags:** civievent, price-sets
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-07. Score: 2
  
  Price-sets are referenced by events and contribution pages. They are independent from events but can be referenced by them. They are similar to locations or option-sets - if you delete one then anything refering to it will be unreferenced. You can use the API (or API-explorer) to delete them faster than the UI but be very careful with SQL as you can break a lot if you are not careful.
  
  1. No, there is no need to duplicate price sets, but it may be convenient
  2. Safest way is to de-reference a price set and then delete it (or delete old events that refer to it.)
  3. API, extension or (in drupal) using [civicrm\_entity](https://www.drupal.org/project/civicrm_entity) you can create rules or bulk editing via views (ask as a separate question if you need help.)
  
  > **Comments:**
  > **username_2**: username_1 - when you mention de-referencing are you saying remove from the link table (civicrm_price_set_entity)?  
  
  ---
  
  