Events Made Easy Forums How do I … #_AVAILABLESPACES{xx} not working at all

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #57833
    Anonymous
    Inactive

    I would have put this in the Bugs board but I it might be user error. So here is what I have done:

    1. Created a new event that uses a template loading in the default #_ADDBOOKINGFORM.
    2. 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”.
    3. 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}.
    4. 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.
    5. 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.

    #57835
    Franky
    Keymaster

    I 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}
    #57842
    Anonymous
    Inactive

    Did 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?).

    #57843
    Franky
    Keymaster

    So 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 🙂

    #57845
    Anonymous
    Inactive

    Thanks 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?

    #57847
    Franky
    Keymaster

    If 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).

    #57848
    Anonymous
    Inactive

    Thanks very much for the tip.

    #57849
    Anonymous
    Inactive

    Hi 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?

    #57850
    Franky
    Keymaster

    Disable 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.

    #57851
    Anonymous
    Inactive

    Oops, 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?

    #57852
    Franky
    Keymaster

    Not 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 …

    #57857
    Franky
    Keymaster

    Ok, 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.

    #57859
    Anonymous
    Inactive

    Thank 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.

    #57864
    Franky
    Keymaster

    I changed the wording a bit and added a screenshot to it, that should help 🙂

    #57868
    Anonymous
    Inactive

    Well done!! Thanks so much for your help and hard work.

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