Hide number of tickets remaining

Home Forums Ticket Products Event Tickets Plus Hide number of tickets remaining

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1306045
    Cath
    Participant

    Hi I had the number of tickets remaining hidden but Since the recent update they are being displayed again. I have searched the forum and found others with the same issue. The advice given was to add
    .tribe-tickets-remaining {
    display: none !important;
    }
    as CSS but this is not working. It also does not work to hide the number remaining in the woo commerce settings.

    I was previously using the code snippet below and this is what stopped working with the recent update. Can you help please? It is essential I have the number of tickets remaining hidden.

    /* From https://gist.github.com/cliffordp/94f37421a00db6f7a96368aa23a8d8bb
    * For https://theeventscalendar.com/support/forums/topic/number-of-tickets-available/
    *
    * The Events Calendar + Event Tickets Plus + WooCommerce:
    Hide remaining quantity unless it is less than 4 (to create a sense of urgency)
    *
    * NOTE: Would need .each loop logic to work properly for more than just the first WooCommerce ticket if more than 1 WooCommerce ticket is available per event!
    */
    function cliff_etplus_woo_conditional_hide_qty_remaining() {
    wp_enqueue_script( ‘jquery’ );
    ?>
    <script type=”text/javascript”>
    jQuery(document).ready( function () {
    var qty_remaining = jQuery( ‘body.single-tribe_events .woocommerce .tribe-tickets-remaining > span.available-stock’ ).first().text(); // would need to loop instead of use .first() to work for more than 1 WooCommerce ticket per Event
    qty_remaining = parseInt( qty_remaining, 10 );
    if ( ! isNaN( qty_remaining ) && 2 < qty_remaining ) {
    jQuery( ‘body.single-tribe_events .woocommerce .tribe-tickets-remaining’ ).hide();
    }
    });
    </script>
    <?php
    }
    add_action( ‘wp_head’, ‘cliff_etplus_woo_conditional_hide_qty_remaining’ );

    #1309714
    Cath
    Participant

    Having looked at this again I think I do still have the tickets remaining successfully hidden on the event page- but it is now showing on the list view which I need to get rid of.

    I need to hide the ‘tickets remaining’ on the list/map views and also hide the ‘Buy now’ button that has appeared recently and the cost display in the list/ map views.

    I would be grateful if you can tell me how to hide these new labels – buy now, cost and tickets remaining that have appeared. Thank you

    #1310300
    Cliff
    Member

    Hi, Cath.

    Could you please provide a link to view the List View on your site so I can see what you’re seeing? I am not seeing the remaining quantity on my List View, only the ticket price: https://cl.ly/1z0b0r3g1b3I

    #1310578
    Cath
    Participant

    This reply is private.

    #1310998
    Cliff
    Member

    This reply is private.

    #1311432
    Cath
    Participant

    Hi Cliff,
    Thanks- this has not worked for the list of events that appears below the map when the calendar is in map view.
    Presumably that would only hide the ‘tickets remaining’? I need the cost hidden also and need to change the text of the Buy now button or it makes a complete nonsense of my site!

    #1312484
    Cliff
    Member

    Cath, providing site-specific CSS fixes isn’t part of our Scope of Support / Terms, but we do try to help where we can from time-to-time.

    In my testing, the CSS I provided worked fine, but if it doesn’t for you then you’ll need to figure it out or ask a developer.

    Or maybe you’ll need to clear your site’s cache to get the rules you added to go into effect.

    #1312798
    Cath
    Participant

    Hi Cliff
    It works for the list view but not in the list of events that appears below the map in map view.
    Yes- I have cleared the cache.
    In Woo commerce I also have it set to never show inventory remaining but that seems to be overridden.

    PS The ‘Buy now’ and tickets remaining are something that have appeared recently. I think a lot of people will have difficulty with this as the scope of The Events Calendar is much broader than just selling ‘tickets’ – it seems to be really limiting. Will there be any future plans to give control over these in settings to switch on/off? It is a little frustrating to have an unwanted new ‘feature ‘ forced upon us which we seemingly can’t get rid of.

    #1313240
    Cliff
    Member

    Cath, thanks for bringing my attention to this setting in WooCommerce.

    I’ve filed a feature request for all of Event Tickets Plus’ front-end displays (e.g. Buy Now Button and Event Single views) to respect this WooCommerce setting for WooCommerce-type tickets.

    I can’t guarantee if or when it’ll be implemented, but I imagine others would like this feature too.

    Thanks for suggesting it!

    #1313778
    paulcrawford
    Participant
    #1314758
    Cath
    Participant

    Hi Paul, Thank you so much for your reply. I was using the same php that has stopped working with the latest update. Your fix works for me in list view but not in the map view. Have you successfully hidden the tickets remaining in the map view? And did you also remove the old fix? I am not sure whether I am doing something wrong – or whether it is because the problem page is set as the store page – or whatever. It is driving me mental…… and making me so cross – I cannot see why any event organiser would want these stupid new features.

    #1314762
    Cath
    Participant

    Thanks Cliff. I still do not have this sorted. The other suggestions hide the tickets remaining except for the map view. I have a lot of events spread all over the UK and really need the map view so that customers can find their nearest event. What can I do?
    Also is there a simple way to change the text of the ‘buy now’ button?

    #1314860
    Cliff
    Member

    Thanks for that help, Paul.

    Cath, if you switch to a WordPress default theme like Twenty Fifteen, Twenty Sixteen, Twenty Seventeen, etc., does the PHP or CSS affect both List and Map views?

    #1314887
    paulcrawford
    Participant

    Hi Cath
    I use the CSS to hide the elements I didn’t want.
    Agree, it seems strange that the option to show or hide those elements are not in the settings.
    I don’t use the map view so can’t help you there I am afraid…

    #1315094
    Cliff
    Member

    Thanks for letting us know, Paul.

    You could request this as a new feature (or maybe search to see if the idea was already posted by someone else) at our plugins’ UserVoice page.

    This allows others who are interested in that feature to easily voice their support. We frequently review suggestions there to find out which ones are popular, then we implement as many of them as we can.

    If you post it / find it, feel free to link to it from here in case anyone comes across this forum thread in the future.

Viewing 15 posts - 1 through 15 (of 18 total)
  • The topic ‘Hide number of tickets remaining’ is closed to new replies.