- This topic has 5 replies, 2 voices, and was last updated 3 years, 11 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › How do I check if the event has limited seats?
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.
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]
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?
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?
That is the correct way of doing it 🙂
Ok. Thanks again for your great plugin and support! 🙂