Forum Replies Created
-
AuthorPosts
-
James
ParticipantThis reply is private.
James
ParticipantThis reply is private.
James
ParticipantThis reply is private.
James
ParticipantThis reply is private.
James
ParticipantJust had a thought – would it be possible to filter the WordPress (WordPress default search widget) search function on my search.php to search for only the event taxonomy? How would I go about doing this please? (Or even on a different file?)
Would be nice if the search could involve a venue field as well as the date and normal field. Thanks in advance.
James
ParticipantSorry for the late response, below are answers to your questions…
1. The date function works and you type in the name of the event ok but nothing happens when you click the “Find Events” button. It just gets a blue outline like a “button” does (have checked and its definitely an input with submit as the type”) when you click it.
2. I have since removed the WordPress search function, and my website uses an offline mode plugin to keep it off until it’s ready.
3. Latest WordPress and Woocommerce, free calendar plugin and tickets plus (paid version)
June 10, 2016 at 5:50 am in reply to: Send attachment based on purchased ticket's location/venue #1125000James
ParticipantAnd with that it’s fixed! Forgot about that bit 😛
Got to learn some way I suppose! Thanks for your help and patience!
June 9, 2016 at 9:00 am in reply to: Send attachment based on purchased ticket's location/venue #1124532James
ParticipantI have tried your code but it is now returning the second result in the if statement no matter what. For an event with a venue of “Chelmsford” it should send the Chelmsford document, and for a Colchester one it should send the Colchester document. My code is below. Do you know where I’m going wrong please?
function attach_doc_to_email ( $attachments , $id, $object ) { $main = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); $tickets = $main->get_tickets( $event_id ); // gets the tickets $venue_id = tribe_get_venue_id( $event_id ); //the id of the event's venue eg Chelmsford's id $venue_info = get_post( $venue_id ); $venue_title = get_the_title( $venue_id ); if (strpos($venue_title, 'Chelmsford') !== false || strpos($venue_title, 'chelmsford') !== false) { $your_doc_path = get_template_directory() . '/instructions/citb-health-and-safety-awareness-course-chelmsford.docx'; }else{ $your_doc_path = get_template_directory() . '/instructions/citb-health-and-safety-awareness-course-colchester.docx'; } $attachments[] = $your_doc_path; return $attachments; }June 8, 2016 at 7:04 am in reply to: Send attachment based on purchased ticket's location/venue #1123805James
ParticipantThanks for the reply, and sorry for being late with mine!
I’ve tried “$venue_info = get_post( $venue_id );” but of course the title can’t be taken from just this.
I have tried the following…
$venue_title = get_post_title( $venue_info );$venue_title = tribe_get_post_title( $venue_info );But with no luck. The if statement runs ok BUT it returns the same result (first option, the “correct” option) each time.
The if statement I’m running is below…
if ($venue_info = "chelmsford") { $your_doc_path = get_template_directory() . '/instructions/citb-health-and-safety-awareness-course-chelmsford.docx'; }else{ $your_doc_path = get_template_directory() . '/instructions/citb-health-and-safety-awareness-course-colchester.docx'; }I’m guessing I’m not getting the title correctly. Can you help me in getting it right please? I bet not much more is needed to be honest!
Thanks for your patience! 🙂
May 24, 2016 at 2:07 am in reply to: Send attachment based on purchased ticket's location/venue #1118118James
ParticipantCould you please give me the variables I need to use the title of the event ticket being bought? Also variables for the ID, venue and other information. or the method to get them please?
May 20, 2016 at 3:41 am in reply to: Send attachment based on purchased ticket's location/venue #1116904James
ParticipantThanks for the reply.
How would I go about doing this? I only started using WordPress recently, not too sure how to go about doing that. Would I need to do an override on any files? Or will it all be in the function on functions.php?
James
ParticipantIgnore that – I got it working with the file path [your-theme]/tribe-events/list/single-event.php
James
ParticipantCall me silly but I haven’t overridden a plugin file before (this is my first freelance project!) so could you let me know how? The rest should be easy enough.
James
ParticipantThanks, the second issue is now solved.
Right, what I want to do is add an “add to cart” button for each event in list view. So each event in list view will have an add to cart button next to it. I want the button to add the correct event ticket to the cart. Each event will always only have 1 kind of ticket available, so it might be possible.
Thanks for your quick reply by the way!
-
AuthorPosts
