Sorting options by date

Home Forums Ticket Products Event Tickets Plus Sorting options by date

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1085711
    Eric Smeets
    Participant

    Hello, I am desperately trying to find a way to sort my product grids by date of the event. So not sorting by the date the product was created in WooCommerce.

    See here an example page of how I want it: http://www.decreatieveschool.nl/test/

    As you can see at the ‘workshop Photoshop deel 1’ the date of 21 mei (May 5) is shown before 5 maart (March 5). But I want to turn this around by sorting by date of the event.

    Thanks, Eric!

    #1086501
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    We have this guide to changing the ticket order to something else:

    Change the Order of Displayed Tickets

    Or you could go into the ticket products and change the publish date in the publish box to order them another way too.

    Let me know and I can try to help out from here, but limited in supporting customizations.

    Thanks

    #1086552
    Eric Smeets
    Participant

    Ok thanks, I will look into that. But before I do I still have a question. I see this code:

    function tribe_wootickets_custom_sort($p, $q) {
    if ($p->price < $q->price) return -1;
    if ($p->price > $q->price) return 1;
    return 0;
    }

    If I want to sort by publish date what code word do I need to use instead of the word ‘price’ above?

    And if I turn around the < and the > sign the sorting order gets turned around right?

    #1086742
    Brian
    Member

    Hi,

    It already sorts by publish date with the oldest showing last in the list. So no changes to the coding you would want to change the publish date in the Product Admin list, you can do that in the product itself or through the quick edit.

    And yes it should change the order by changing the symbols.

    #1093463
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Sorting options by date’ is closed to new replies.