Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Member already registered | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Member already registered

Member already registered

Posted: September 6, 2013 at 4:44 am

Viewing 6 reply threads


Klaus M

September 6, 2013 at 4:44 am

The code on http://staging.eventespresso.com/topic/how-to-display-member-is-already-registered-to-event/ works like a charm! Thanks for that. Now i’d like to have a little IF/ELSE thing but do not know where to edit that?!

So if the member has not registered

<p class=”event_form_submit” id=”event_form_submit-<?php echo $event_id; ?>”>
<input class=”btn_event_form_submit ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all” id=”event_form_field-<?php echo $event_id; ?>” type=”submit” name=”Submit” value=”<?php _e(‘Submit’, ‘event_espresso’); ?>”>
</p>

ELSE

echo ‘<p style=”background-color:red; color:#fff; font-size:20px; text-align:center;”>Hey you already booked this!</p>’;

Any idea?

Thanks!


Dean

  • Support Staff

September 6, 2013 at 6:06 am

Hi,

In btween the curly braces on this line

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>if($event_list_id == NULL) {} else {

you will need to wrap your code in php tags though

e.g.

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>if($event_list_id == NULL) {
?>
your code
<?php
} else {


Klaus M

September 7, 2013 at 5:13 am

hm, all is see is nothing?! what have i done wrong?


//var_dump($event_list_id);

if($event_list_id == NULL) {

echo ‘<p>SUBMIT BUTTON HERE</p>’;

} else {
foreach ($event_list_id as $id) {
if ($id == $event_id) {
echo ‘<p style=”background-color:red; color:#fff; font-size:20px; text-align:center;”>Hey you already booked this!</p>’;
break;
}
}
}

?>

<p class=”event_form_submit” id=”event_form_submit-<?php echo $event_id; ?>”>
<input class=”btn_event_form_submit ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all” id=”event_form_field-<?php echo $event_id; ?>” type=”submit” name=”Submit” value=”<?php _e(‘Submit’, ‘event_espresso’); ?>”>
</p>

<?php } ?>

</form>
</div>


Klaus M

September 10, 2013 at 5:46 am

Any news on this?


Josh

September 10, 2013 at 2:19 pm

Hi Klaus,

If you require the services of a PHP developer to work with you to make your needed customizations as specified, we can advise contacting one of our recommended developers:

http://staging.eventespresso.com/developers/event-espresso-pros/


Sidney Harrell

  • Support Staff

September 10, 2013 at 2:21 pm

I would do it slightly differently, with a flag:
https://gist.github.com/sidharrell/5c94fa7a50ccfb9d93c8


Klaus M

September 11, 2013 at 3:29 am

Excellent! Exactly what i was looking for. Thank you so much, Sidney!

VERY RESOLVED :)

Viewing 6 reply threads

The support post ‘Member already registered’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server