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

Receipt Line Items shows “(visible by admin access)” #8

Open zkrebs opened 6 years ago

zkrebs commented 6 years ago

The extension changes the line item text if back-end user is part of the CiviCRM admin group

if ($hide) {
    if ($isAdmin) {
      $amount[$amount_id]['options'][$priceOption['id']]['label'] .= '<em class="civicrm-groupprice-admin-message"> (visible by admin access)</em>';

Consequence of this is the receipt contains the text "(visible by admin access)"

The workaround I see: change the text, or remove it? Other thoughts? Ideally only the people in the admin group would see this text, and the receipt would display the normal line item text unmodified.

https://civicrm.stackexchange.com/questions/25958/group-based-pricing-extension-receipt-line-items-shows-visible-by-admin-acce

zengenuity commented 6 years ago

Can you provide steps to reproduce this? I'm the developer of the extension, but I don't use it on a daily basis. It's for a client, and they have not mentioned any issues about receipts.

zkrebs commented 6 years ago

Step 1. Create a price set Step 2. Add a new price field Step 3. Edit price field and restrict access to Smart Group that you are not a part of Step 4: Add yourself to gid=1 "Administrators" group in CiviCRM Step 5: Add a new event registration for a new contact using price set in Step 1 Step 6: The price set field/option you are restricted from seeing, because you are not part of the group, says "price field name (visible by admin access)" Step 7: When you finalize the event registration, select the option in Step 6 and choose to send a receipt Step 8: The user receives a receipt with a table itemizing the line items sold, the line item in the table says "price field name (visible by admin access)"

So, it would be ideal if the price set item that was sent to the end-user via a receipt did not say "visible by admin access" as it's not the end-users concern/used for accounting purposes.

Hope that helps!

image