Events Made Easy › Forums › How do I … › #_AVAILABLESPACES{xx} not working at all
- This topic has 14 replies, 2 voices, and was last updated 6 years, 7 months ago by Anonymous.
-
AuthorPosts
-
Tue 10 Apr 2018 at 15:46 #57833AnonymousInactive
I would have put this in the Bugs board but I it might be user error. So here is what I have done:
- Created a new event that uses a template loading in the default #_ADDBOOKINGFORM.
- After experimenting briefly, I changed this event to a multiseat event with Price value of “15||25||30” and Max Number of Spaces to Book value of “5||8||5”.
- Changed the default booking form in the settings to include #_SEATS{xx}, which populates the dropdowns correctly. My template also displays the 3 different price levels correctly using #_PRICE{xx}.
- I don’t want table rows to appear if there are no available seats in them, so I introduce a conditional shortcode using #_AVAILABLESPACES{1}, but it doesn’t work right. So I attempt to print out #_AVAILABLESPACES{1} directly to the page, but nothing gets printed out.
- Just to test further, I attempt to print out #_AVAILABLESPACES{1} to the template I’m using, but nothing comes through there either.
So, it appears this placeholder #_AVAILABLESPACES{xx} is not working at all for me. If I’ve forgotten a step in the Event setup, please let me know. (I assume including the #_SEATS{xx} placeholder in the default booking form rather than a custom form for this event is acceptable.)
Any idea why this isn’t working? It might be a bug.
Tue 10 Apr 2018 at 21:21 #57835FrankyKeymasterI just tested this and seems to work just fine …
This is my test:<table class='eme-rsvp-form'> <tr><th scope='row'>Last Name*:</th><td>#_LASTNAME</td></tr> <tr><th scope='row'>First Name*:</th><td>#REQ_FIRSTNAME</td></tr> <tr><th scope='row'>E-Mail*:</th><td>#_EMAIL</td></tr> <tr><th scope='row'>Phone number:</th><td>#_PHONE</td></tr> <tr><th scope='row'>Seats*:</th><td>#_SPACES{1} and #_SPACES{2}</td></tr> <tr><th scope='row'>Comment:</th><td>#_COMMENT</td></tr> #_CAPTCHAHTML{<tr><th scope='row'>Please fill in the code displayed here:</th><td>#_CAPTCHA</td></tr>} </table> #_SUBMIT Available: #_AVAILABLESPACES{1} and #_AVAILABLESEATS{2}
Wed 11 Apr 2018 at 13:10 #57842AnonymousInactiveDid you try making an event with SINGLE seating first, then saving it as MULTISEAT later? That is the only thing I could imagine might cause this (an event being initialized in the wrong state?).
Wed 11 Apr 2018 at 15:08 #57843FrankyKeymasterSo far I have not. Maybe there might be an issue where reservations were already made when it was a single-price event and then you switched to multiprice … I’ll try that one later, but feel free to test yourself too 🙂
Wed 11 Apr 2018 at 15:58 #57845AnonymousInactiveThanks very much Franky. I don’t think there were any reservations.
Can you direct me to a log or something that will help me troubleshoot this issue?
Wed 11 Apr 2018 at 16:15 #57847FrankyKeymasterIf there are errors, they should be visible in either your webserver console (for javascript errors, but I don’t think that’ll be the case here) or in your webserver logfiles (php errors go to the error logfile configured by your webserver/hosting provider).
Wed 11 Apr 2018 at 16:27 #57848AnonymousInactiveThanks very much for the tip.
Wed 11 Apr 2018 at 16:33 #57849AnonymousInactiveHi Franky. I don’t know if this is a lead or not, but I got a lot of these purge cache errors:
[Tue Apr 10 17:14:17.999133 2018] [:error] [pid 8765] [client 185.244.215.8:39188] purge_varnish_cache() failed for: (localhost) #^(domainxxxxx\\.staging\\.hostxxxxx\\.com)$# #(/event-booking(.*)|/wp-json/wp/v2/pages|^/$|/feed)#, referer: http://domainxxxxx.staging. hostxxxxx.com/wp-admin/post.php?post=2610&action=edit
Any issue there?
Wed 11 Apr 2018 at 16:39 #57850FrankyKeymasterDisable the cache and try again 🙂
I always recommend to disable the cache for the EME files (because some pages use generated javascript), but I’m not an expert in varnish cache.Wed 11 Apr 2018 at 16:49 #57851AnonymousInactiveOops, should have talked to the host about that before annoying you with it. The varnish errors are happening because the cache IS turned off – as you can see I’m developing on staging. So this is expected behavior. (Way to clog up my error logs, host! :/)
So . . . any last thoughts about what this issue could be caused by? Is it possible to set a debug mode or something so that every placeholder kicks out some sort of helpful data so we can track down the issue?
Wed 11 Apr 2018 at 16:56 #57852FrankyKeymasterNot really, because that might break ajax calls and such …
I’ll try it this evening with a ‘normal’ single event and changing it to multiprice afterwards.
If that doesn’t work (well, in fact: if it does work as expected), I’ll need to come over to your site and check on your setup what might be the problem. Feel free to forward my an admin login on your site (with permission to change the files of the EME plugin) and foresee an event that shows the problem …Wed 11 Apr 2018 at 17:58 #57857FrankyKeymasterOk, there is no issue on your site: you activated multi-price, but not multi-seat. Meaning: you’re asking for different prices but 1 total amount of seats, so there is no point in available seats per price category either (and thus the replacement is empty). In your case, you just need #_AVAILABLESEATS, or define different seat categories too.
If you want to provide early-bird discounts, I suggest you look into the discount parts of EME.Wed 11 Apr 2018 at 18:19 #57859AnonymousInactiveThank you very much for checking out my site, Franky. That definitely fixed it!
I was using the wrong field, which I clearly described in step 2 of the OP and you can see there that was the issue. The reason I was using the wrong field for the seats is directly due to the Multiseat page in the documentation, which states:
“But where – with multiprice events – you create price categories, here you can define (if wanted) the maximum available seats per price category.”
That is a very confusing sentence which led me to use the Max Number of Spaces to Book field instead of the correct field which is Spaces.
In addition, this nomenclature of “price categories” is very confusing, especially considering you use Event Categories as a built-in feature of EME. “Price levels” would be a more appropriate phrase.
I highly recommend totally scrapping the content on the Multiseat page and writing it over again, describing precisely what it means and what is required to set up a Multiseat event.
Thank you so much for your great plugin and hard work.
Wed 11 Apr 2018 at 19:24 #57864FrankyKeymasterI changed the wording a bit and added a screenshot to it, that should help 🙂
Wed 11 Apr 2018 at 20:18 #57868AnonymousInactiveWell done!! Thanks so much for your help and hard work.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.