Hide add-to-cart button if user already purchased

Home Forums Ticket Products Event Tickets Plus Hide add-to-cart button if user already purchased

  • This topic has 0 replies, 2 voices, and was last updated 8 years ago by simpletheory.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1493913
    simpletheory
    Participant

    I have event tickets set up so that a logged in user can only purchase 1 ticket to an event. I want to limit them so they cannot go back and purchase another. Is there a way to hide the button if they have already purchased a ticket for that event?

    Additionally, I’d like to add a message that “Attending” indicator within the event so they know. Would this go in the orders-links.php file?

    #1494920
    Jennifer
    Keymaster

    Hello,

    Nice job getting it set up so that users can only purchase one ticket at a time! To change the button, you could do a template override of the tickets.php file found at wp-content/plugins/event-tickets-plus/src/views/wootickets. Look for this around line 205:

    <td colspan="4" class="woocommerce add-to-cart">
    <?php if ( $must_login ) : ?>
    <?php include Tribe__Tickets_Plus__Main::instance()->get_template_hierarchy( 'login-to-purchase' ); ?>
    <?php else: ?>
    <button
    type="submit"
    name="wootickets_process"
    value="1"
    class="tribe-button"
    >
    <?php esc_html_e( 'Add to cart', 'event-tickets-plus' );?>
    </button>
    <?php endif; ?>
    </td>

    We are a bit limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know – I’ll be happy to point you in the right direction!

    #1514980
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Hide add-to-cart button if user already purchased’ is closed to new replies.