James

Forum Replies Created

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • in reply to: Search function brings up single event twice #1127781
    James
    Participant

    This reply is private.

    in reply to: Search function brings up single event twice #1127219
    James
    Participant

    This reply is private.

    in reply to: Search function brings up single event twice #1127218
    James
    Participant

    This reply is private.

    in reply to: Search function brings up single event twice #1126581
    James
    Participant

    This reply is private.

    in reply to: Search function brings up single event twice #1125783
    James
    Participant

    Just 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.

    in reply to: Search function brings up single event twice #1125782
    James
    Participant

    Sorry 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)

    James
    Participant

    And with that it’s fixed! Forgot about that bit 😛

    Got to learn some way I suppose! Thanks for your help and patience!

    James
    Participant

    I 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;
    }
    James
    Participant

    Thanks 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! 🙂

    James
    Participant

    Could 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?

    James
    Participant

    Thanks 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?

    in reply to: Add buy button to front #1116299
    James
    Participant

    Ignore that – I got it working with the file path [your-theme]/tribe-events/list/single-event.php

    in reply to: Add buy button to front #1116298
    James
    Participant

    Call 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.

    in reply to: Add buy button to front #1115373
    James
    Participant

    Thanks, 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!

Viewing 14 posts - 16 through 29 (of 29 total)