Events Made Easy Forums How do I … How do I check if the event has limited seats?

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61943
    Anonymous
    Inactive

    Hi.

    On my event list I show the amount of free and total seats. But some events doesn’t have a seat limit. So it will be shown: “∞ of ∞ seats are free”. Now I try to find an if-statement to avoid this. I have tried something like:

    [eme_if tag='#_TOTALSEATS' value='∞']no limit[/eme_if]
    [eme_if tag='#_TOTALSEATS' value='0']no limit[/eme_if]
    [eme_if tag='#_TOTALSEATS' value='']no limit[/eme_if]

    But this doesn’t work. How can I check if an event has not limit of seats.

    #61944
    Franky
    Keymaster

    Well, the replacement there is causing you trouble. So, to fix this, implement this small change

    https://plugins.trac.wordpress.org/changeset/2451365/

    And then use:
    [eme_if tag='#ESC_TOTALSEATS' value='0']no limit[/eme_if]

    #61945
    Anonymous
    Inactive

    Thanks! That works so far. 🙂

    Now I’ve this rules:

    1 [eme_if tag='#ESC_TOTALSEATS' value='0' ]no limit[/eme_if]
    2 [eme_if tag='#_AVAILABLESEATS' value>'0']#_AVAILABLESEATS of #_TOTALSEATS free[/eme_if]
    3 [eme_if tag='#_AVAILABLESEATS' value='0']booked up[/eme_if]

    And a new problem. Rule 2 and 3 are mutually exclusive but rule 1 does not. So things like “no limit ∞ of ∞ free” happen. I’m missing a kind of else-statment or an “AND” to connect conditions. As far as I could see in documentation there is no such thing. Any idea how I can get exclusive messages?

    #61946
    Anonymous
    Inactive

    found “eme_if2” function 🙂

    [eme_if tag='#ESC_TOTALSEATS' value='0' ]no limit[/eme_if]
    [eme_if tag='#ESC_TOTALSEATS' value>'0' ]
    [eme_if2 tag='#_AVAILABLESEATS' value>'0']#_AVAILABLESEATS of #_TOTALSEATS free[/eme_if2]
    [eme_if2 tag='#_AVAILABLESEATS' value='0']booked up[/eme_if2]
    [/eme_if]

    And it seems to work! 😀

    Is this syntax ok?

    #61947
    Franky
    Keymaster

    That is the correct way of doing it 🙂

    #61948
    Anonymous
    Inactive

    Ok. Thanks again for your great plugin and support! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top