zengenuity / civicrm_groupprice

CiviCRM extension that allows you to limit the display of individual prices in price sets to specific groups. This can be used to implement members-only pricing for events, as well as other use cases.
Other
3 stars 9 forks source link

"All other options for this 'Public' field have 'Admin' visibility. There should at least be one 'Public' option, or make the field 'Admin' only." #11

Closed zkrebs closed 2 years ago

zkrebs commented 5 years ago

In CiviCRM 5.11 we cloned a price set and then attempt to edit/add options in a Public Field, but we are not able to because of this error.

If we mark the field 'Private', then it lets us edit/add options, then we can make the field 'Public' again (possible workaround).

Any reason why we are getting the error? In our price field, at least one of the options is public, if not many. We also can't create a new option either.

nea-tingstroem-dk commented 4 years ago

The option.tpl needs to be updated with the field for visibility selection

The file is ...\civicrm_groupprice\templates\CRM\Price\Form\Option.tpl Insert <tr.../tr> section below before the comment shown. This will ensure that the visibility field is set to a valid value (public).

  <tr class="crm-price-field-form-block-visibility_id">
    <td class="label">{$form.visibility_id.label}</td>
    <td>&nbsp;{$form.visibility_id.html} {help id="id-visibility-options" file="CRM/Price/Page/Field.hlp"}</td>
  </tr>        
  {* Limit Prices by Group: Start of code addition *}
Upperholme commented 3 years ago

This issue is a major PITA, and made me liable this extension despite its usefulness. I'll try the suggested workaround - thanks @zkrebs . @nea-tingstroem-dk - any chance of making that into a pull request?

zengenuity commented 2 years ago

12 merged