progressivetech / net.ourpowerbase.qrcodecheckin

QRCode Checkin allows you to send an email that contains a scanable code to the registered participants for your event.
Other
16 stars 15 forks source link

token can not custom #33

Open nickchu852 opened 5 months ago

nickchu852 commented 5 months ago

I can use {qrcodecheckin.qrcode_html_5} to display a QR code, but if I want to change it based on different event IDs, {qrcodecheckin.qrcodehtml{event.id}} cannot be used normally. Please tell me how to solve it.

jmcclelland commented 5 months ago

I don't think you can nest tokens like that, so I don't think what you are trying to do is possible.

nickchu852 commented 5 months ago

So this PLUGIN can only specify one activity, and cannot make changes because of different event.id?

jmcclelland commented 5 months ago

The full explanation for how it works is in the readme file.

In short - this extension operates on events. In the event configuration screen, you can choose which events should have QR codes enabled. If an event has the Enable QR codes check box checked, then a token is automatically generated for you and will be available in the list of tokens.

So, rather than try to create your own custom tokens, just check the box for your event, and the token will appear in the drop down list.

nickchu852 commented 5 months ago

If more than one event is enabled for QR code usage, it becomes impossible to use it as the email form, Events - Registration Confirmation and Receipt (on-line), is sent upon completing the event application.

For example, if "Event 1" and "Event 2" are both open for registration, the same email form will be used when sending the confirmation email. However, the tokens used for the QR code display are not flexible and can only be {qrcodecheckin.qrcode_html_1} or {qrcodecheckin.qrcode_html_2}. It is not possible to dynamically change the event number using the format {qrcodecheckin.qrcodehtml{event.id}}.

I have already spent a lot of time trying to understand and solve this issue, but I haven't been successful. Even in your GitHub usage examples, you use {qrcodecheckin.qrcode_html_3}, where the number 3 is hard-coded and not flexible. I hope you understand what I mean.

jmcclelland commented 5 months ago

The intended workflow is that you send the QR code manually, via CiviMail, not in an automated way via the confirmation message for the event. Maybe that would be possible if there was a token representing the QR code for the given event (if the event id is present when the token generation happens). Open to a pull request, but I'm not able to add this feature at this time.