How to Customize submission form with fixed prices / How to show event attendees

Home Forums Ticket Products Community Tickets How to Customize submission form with fixed prices / How to show event attendees

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1049884
    Davide
    Participant

    Hey Guys

    I installed Event Tickets Plus + Community Events + Community Tickets and I’m trying to customize the Submission Form according to the guide you provide (https://theeventscalendar.com/knowledgebase/themers-guide/).

    I’m trying to do the following:
    – remove “Sell using”, “Ticket Name”, “Ticket Description”, “Start/End sale”
    – block “Price” field with a given number (e.g. €25 if the event is one-day-long, €40 if it is two-day-long, and so on)
    – leave “Stock” field as it is, then automatically modify it in the back-end

    As you can see, I need to block the Price number according to the value the user puts in the stock field, or according to the number of days the events lasts.

    I thought I could do it by customizing the submission form, but I don’t find the fields in the folders…Can you help me doing it?

    Last but not least, I’d like to show the attendees names and faces when they buy the event and participate. Any idea about how to do that?

    Thanks a lot! Bye

    #1050249
    Davide
    Participant

    UPDATE: I’ve managed to remove “Sell using”, “Ticket Name”, “Ticket Description”, “Start/End sale” from edit-event.php in the community folder. I still need help with the price block.

    Waiting for suggestions…
    Thanks a lot!

    #1050870
    Josh
    Participant

    Hey Davide,

    Thanks for reaching out to us!

    For the attendees list, try the following snippet to get the list to show on the single event view. You may have to do some additional customization to get everything to display as you would like but it should work to get you pointed in the right direction:

    
    /**
     * List attendees on the single events page (WooCommerce-based orders
     * in this example).
     *
     * This is just a quick hack/possible starting point - be nice to add a
     * helper/template tag within Event Tickets to get the attendee list or
     * change the public visibility of Tribe__Tickets__Tickets::get_attendees()
     * to make it easier for folks to roll their own.
     *
     * Important! This class would of course have to be defined later than
     * Tribe__Tickets_Plus__Commerce__WooCommerce__Main (ie, don't include
     * this until after a suitably late point like the init action and until
     * you have confirmed the superclass exists).
     */
    class FrontendAttendeeData extends Tribe__Tickets_Plus__Commerce__WooCommerce__Main {
        public function hooks() {
            parent::hooks();
            add_action( 'tribe_events_single_event_before_the_content', array( $this, 'frontend_attendees_list' ) );
        }
    
        public function frontend_attendees_list() {
            $attendees = $this->get_attendees( get_the_ID() );
    
            if ( empty( $attendees ) ) return;
    
            echo '<h4> Confirmed attendees </h4> <ul>';
    
            foreach ( $attendees as $attendee )
                echo '<li>' . $attendee['purchaser_name'] . '</li>';
    
            echo '</ul>';
        }
    }
    

    A note on the above though, we are expected to include the ability to have attendees display on the frontend within an upcoming release.

    Customizing the price the way you would like is unfortunately outside the scope of what we’re able to support. However, to help point you in the right direction take a look at the Event Ticekts Plus plugin files within the src > admin-views > price-fields.php file and you’ll see how that section is added.

    Let me know if this helps.

    Thanks!

    #1076491
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to Customize submission form with fixed prices / How to show event attendees’ is closed to new replies.