Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kultuer ticket requests #21

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Add Kultuer ticket requests #21

wants to merge 16 commits into from

Conversation

MasterCarl
Copy link
Contributor

No description provided.

Copy link
Member

@tom95 tom95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great changes! I really like the looks of the request dialog for the user.
Some minor nitpicking going on in the review otherwise :)

'user_id'=>$current_user->ID);
$answer_request_action = admin_url('options.php?' . http_build_query($response_parameters));

$to = '[email protected]';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

das sollte vermutlich in die config ausgelagert werden

$current_user = wp_get_current_user();
$event = get_post($_REQUEST['event']);
$num_tickets_total = get_field( "num_tickets", $_REQUEST['event'] );
$num_tickets_assigned = get_field( "num_tickets_assigned", $_REQUEST['event']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coding style ;)


function kultuer_send_ticket_response_mail($_to, $subject, $message) {
$to = '[email protected]'; // TODO: remove
$headers = 'From: [email protected]' . "\r\n" . // TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hier auch wp-config.php

'X-Mailer: PHP/' . phpversion();
//echo $message;
mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $message, $headers);
$success_message = 'Die%20Ticketanfrage%20wurde%20erfolgreich%20versendet.%20Wir%20werden%20Sie%20per%20E-Mail%20an%20' . $current_user->user_email . '%20benachrichtigen.';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

das hier lieber mit urlencode lösen :)

<label class="sr-only" for="numberOfTickets">Anzahl der Tickets</label>
<div class="input-group">
<input type="number" value="2" class="form-control" name="number_of_tickets" id="numberOfTickets" placeholder="Anzahl">
<span class="input-group-addon">Karten anfragen</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coole idee! ich würd das "anfragen" nach "Karten" aber rausnehmen, sonst wirkt es wie ein button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants