Since you are passing $entity_id to id in participant params without checking it to be not empty. If $entity_id is empty then new participant will be created else it will be updated. Make sure your id is set before calling to participant api if you want to update the participant
I understand that there are some issue when moving contact when logged is as Admin. You can also try an extension developed by LCD Services that moves participant from one contact to another.
I would use the CiviRules extension, you could structure it something like - if registered participant of 'X' event, send email of 'X' template.
With this you could just create an email template for each event within Civi with the links you would like them to access and it would automatically send to anyone who registers for the event.
From the backtrace, you can see that the error is caused by a line in the org.civicrm.multidomaininvoicing extension. I assume this is your extension?
getvalue is only appropriate if you're sure that a value exists; in this case, you made an API call for a value that doesn't exist. If this is a possibility in your scenario, instead use get and search the ...
Md Maidul Islam,
Bit difficult to understand from your question what you want to achieve.
1 - Do you mean to add participant for an event? Then you can use Entity = Participant and Action = Create api
$result = civicrm_api3('Participant', 'create', [
'event_id' => 3,
'contact_id' => 51,
2 - Do you mean to add participant for an event with ...
You could do it in multiple steps:
search for Event 1 participants then create a group
use advanced search, enter the new group in the group box, and in the events section select Event 2 participants
You could create both of those as smart groups if you want to check progress as registrations come in.
But hopefully someone has a more streamlined method!
I confirmed that this is caused by having a name badge layout with a spacer field and sorting the participants by name prior to generating name badges. My work-around for now is to instead of using a spacer in the badge layout, to insert an unused blank field, and I can now print alphabetically sorted badges.
Another route to consider - add some custom fields to your Event entity, then you can put the url in to those fields, then you can set up a Sch Reminder that is using a token for the custom field, and bingo, each participant gets sent the links to the right document. Very light/easy solution. but i may still not have quite grasped the requirement :-)
I do this with our community, but we use Drupal and create an "organic group" for each event. We did some investigating of what it would take to migrate off Drupal and onto Wordpress, and group functionality was one of the difficult points.
In Wordpress, the closest I have found to this is the Group plugin. You could create a group for each event. Then ...
Welcome empiguet. I do not use WP so much and I may not quite follow your workflow but I think you would need to do something as follows
- if person registers then add to Smart Group
- if in Smart Group, then set specific WP role (this may need an extra extension, i don't know if WP offers it, i do know Drupal does so an equivalent may exist)
- set up WP ...
Advanced Search, Participant Search And reports only allows you to select 'One of' the selected option i.e it does "Event 1 OR Event 2" on the selected events.
But I guess you want "Event 1 AND Event 2", if so you can use CiviCRM >> Search >> Search Builder to do AND between conditions. See below attached image
Even if the label is different in English and Chinese, the above API with 'status_id' => "Registered", parameter should work fine as it is meant to make the mapping based on name and not label.
Anyway, I think you should be able to use id instead of passing the name of the participant status in the api params. Something like -
$statusOptions = ...