jothikannan
Forum Replies Created
-
Hi caimin_nwl,
Thank you so much for your kind reply,
i got it myself by adding the filters for the query by following code
function my_custom_join($join){ global $wpdb; $Eventtable = $wpdb->prefix."em_events"; $Locationtable=$wpdb->prefix."em_locations"; $poststable=$wpdb->prefix."posts"; $join .= " JOIN $Eventtable ON $Eventtable.post_id = $poststable.ID"; $join .= " JOIN $Locationtable ON $Locationtable.location_id = $Eventtable.location_id"; remove_filter( current_filter(), __FUNCTION__ ); return $join; } function my_custom_where($where){ global $wpdb; $Eventtable = $wpdb->prefix."em_events"; $Locationtable=$wpdb->prefix."em_locations"; $poststable=$wpdb->prefix."posts"; if(!empty($_COOKIE['my_cookie_city_code'])) { $state=$_COOKIE['my_cookie_city_code']; } else { $state=''; } if($state!="") { $where .= " AND $Locationtable.location_state = '$state'"; } remove_filter( current_filter(), __FUNCTION__ ); return $where; }
Hi angelo and caimin_nwl
Can you help me on this, i tried to get the events by location state, but i can’t get the result
We can write the tax and meta query because the location town doesn’t in the terms and metadata table, so i don’t have any idea to get the events by the location state or town
Hi caimin_nwl,
thank you so much for the reply
What i have to do now?? without location_town in the wp_em_locations table how can i get it??
Hi angelo,
Thanks for the answer
i don’t to be do it with shortcode, i need to do it with custom wp_query, is this is possible ?? kindly let me know
Hi,
i want to show the events on my home page, and events listings page, also on the search page. so any where in my website i want to show the events based on the city selected from the drop-down menu.
this is my website
https://www.grancapodanno.com/Hi angelo_nwl,
Your given snippet working, Great work, thanks lot,
Now i can send the email with the receipt with the pdf attached on confirm the booking
And default email system for the other status is working fine
Cheers ….
Hi caimin_nwl,
Actually i want to send the PDF with the list of booked tickets with the reservation details while admin confirm the booking, on before that i have successfully generated the PDF for the booking, now i want to send this PDF on admin approval of the booking
So here i tried with the code given by angelo_nwl, but after include the code in functions.php i can see there is the option to send a email to the booked user, it is working i can send the email using that option, but after that default email system for booking approval, pending and eject every system is sending the same email that i have wrote in the functions.php, this is the problem am getting here, am sending the emails based on the status of booking, but all the booking it sending the same email.
please help me on this.
Hi angelo,
yes i have cheeked with this status, but however if i check any status it sending the Pending email content i write here
`if ( $EM_Booking->get_status() == 1 ) {
$person_id=$EM_Booking->person_id;
$booking_id=$EM_Booking->booking_id;$user_info = get_userdata($person_id);
$user_email= $user_info->user_email;
$username = $user_info->user_login;
$first_name = $user_info->first_name;
$last_name = $user_info->last_name;$booking_receipt=’booking_’.$booking_id.’.pdf’;
//$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/booking_56.pdf’ );
$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/’.$booking_receipt.” );
$subject=”Your booking is confirmed”;
$message=”Thanks for booking the events, please find the receipt copy of your reservation”;
$headers .= ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= ‘From: [email protected]’ . “\r\n”;
wp_mail($user_email, $subject, $message, $headers, $attachments );
}if ( $EM_Booking->get_status() ==0 ) {
$person_id=$EM_Booking->person_id;
$booking_id=$EM_Booking->booking_id;$user_info = get_userdata($person_id);
$user_email= $user_info->user_email;
$username = $user_info->user_login;
$first_name = $user_info->first_name;
$last_name = $user_info->last_name;$booking_receipt=’booking_’.$booking_id.’.pdf’;
//$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/booking_56.pdf’ );
$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/’.$booking_receipt.” );
$subject=”Your booking is pending”;
$message=”Thanks for booking the events, your booked events are peding “;
$headers .= ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= ‘From: [email protected]’ . “\r\n”;
wp_mail($user_email, $subject, $message, $headers, $attachments );
}
`meaning that if i approve the booking it send the
elseif
condition , if i unapprove, it seems the same again, what is wrong here ???Hi angelo,
After added your code and i have worked with my needs, after that if i approve, reject or unapprove the booking it sending the same email content that i write inside
` if ( $EM_Booking->get_status() == 0 ) {
$person_id=$EM_Booking->person_id;
$booking_id=$EM_Booking->booking_id;$user_info = get_userdata($person_id);
$user_email= $user_info->user_email;
$username = $user_info->user_login;
$first_name = $user_info->first_name;
$last_name = $user_info->last_name;$booking_receipt=’booking_’.$booking_id.’.pdf’;
//$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/booking_56.pdf’ );
$attachments = array( WP_CONTENT_DIR . ‘/uploads/receipt/’.$booking_receipt.” );
$subject=”Your booking is confirmed”;
$message=”Thanks for booking the events, please find the receipt copy of your reservation”;
$headers .= ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= ‘From: [email protected]’ . “\r\n”;
wp_mail($user_email, $subject, $message, $headers, $attachments );
}`what i have to do, i need only send the attachment on approve the booking, help me on this, i will be thankful to you
Hi angelo,
also may i send the attachment in the new function ??
by like below ??
$msg['user']['subject'] = 'New Subject'; $msg['user']['body'] = 'New email body'; $msg['user']['attachment'] = 'exmaple.pdf';
Hi angelo,
Thanks for the code, it is working, but i need to know something more,
The code you given is only working with the Pending Booking, if i set into
$EM_Booking->get_status() == 0
and re- send the email it sending the default booking confirmation email instead of my re-send email ?? i need to send my message for the confirmed bookings only.also how can i get the booking id and booking person id on my_event_messages function ??is this is possible,
Hi,
i have checked that i can’t send the mail using $EM_Mailer ,but i can’t find where approve and unapprove functions are working in the em-booking.php, i have wirte code to send email in approve() function but doesn’t working, it doesn’t make any sense if we write exit, it doesn’t care, so am just confusing the function for approve the Booking is here or where ???
Hi angelo_nwl,
Thanks for the answer, i hope this will help me, i will try and let you know..
Hey philipjohn,
Thanks lot for the answer
Actually am not using Pro version of events manager, so am coding myslef to send the PDF while confirm the booking, there is no problem with PDF creation i done it, but i want to send it to the user while approve the booking.
i hope this may clear my question
Forum: Plugins
In reply to: [Yoast SEO] After activate the yoast it cause some error?Hi gold84it,
yes i can find it, but there is no relationship between these 2 plugins Events manager and Yoast, the function working fine without yoast, after activated the yoast it cause this error
SO i can’t understand where is the problem is….