Events Made Easy Forums Bug fixed or feature request implemented Linking Subscriptions and Event RSVP functionality

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #57825
    Anonymous
    Inactive

    Subscriptions would be much more useful if they worked together with the Event RSVP & Discount functionality.

    Ideally, we would have a way to:

    • Grant RSVP permissions to only users who hold given Subscriptions (Event RSVP multi-select)
    • Apply an automatic Discount to Subscription holders (Subscription and RSVP settings)

    I’m sure there are more connection points between these features. Please add more ideas below!

    #59057
    Franky
    Keymaster

    Since these already exist for quite some time now:

    #_IS_USER_IN_GROUP{xxx} (‘1’if the logged in WP user is in the EME group called ‘xxx’, ‘0’ otherwise)
    #_IS_USER_MEMBER_OF{xxx} (‘1’if the logged in WP user is a member of the EME membership called ‘xxx’, ‘0’ otherwise)

    this means we can use conditional tags to show/hide stuff (and also the rsvp form has these as extra invocations #_ADDBOOKINGFORM_IF_USER_IN_GROUP{xxx} and
    ##_ADDBOOKINGFORM_IF_USER_IS_MEMBER_OF{xxx} )
    So for now, I’ll close this.

    #59229
    Anonymous
    Inactive

    Hi Franky, I am trying to use the conditionals you added above in order to give a Discount to members when they RSVP.

    The EME issue I’m running into is that Discounts are tied to events, not RSVP forms.

    Can you give me a hint on how I can implement Membership Discounts (using the conditionals above, I assume)?

    #59233
    Franky
    Keymaster

    Well, quite easy: just create a custom field with “extra charge” set to yes and the value to something negative (for the discount). You can even make that a hidden field, so it doesn’t bother anybody.
    Then use a conditional tag around that field and you’re good to go.
    While I’m at it, maybe I’ll extend the basic discount functionality to include this directly, but I need to think how to implement that in a user-friendly fashion.

    #59270
    Anonymous
    Inactive

    Thanks for the tip, Franky. I am trying to figure out the Custom Fields functionality to implement your suggestion. Can you point me to some documentation about them? I looked around but couldn’t find anything on the site.

    Edit: Found it here from the link on the Custom Field edit page!
    https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-6-registration-form-fields/

    I still think your documentation could use a page briefly explaining the different options on the Custom Fields edit page, however.

    #59271
    Anonymous
    Inactive

    I have one last question. For a multiprice event, can I set multiple (negative) values for the Custom Field extra charge? Something like this:

    -10||-20||-30

    #59274
    Anonymous
    Inactive

    Actually I’m currently struggling to implement your suggestion. The (negative) extra charge doesn’t get applied.

    Here is the HTML from my hidden discount field that gets inserted into my RSVP form:

    <input type="hidden" name="FIELD1" id="FIELD1" value="" class="dynamicprice nodynamicupdates">

    According to the URL on my Custom Field edit page, ID should be 1. Is this code correct? Why isn’t the value (should be -30) in the tag? How do I implement a discount based on this Custom Field?

    #59275
    Franky
    Keymaster

    First: you pointed a bug out to me concerning hidden fields (the empty value). This will be fixed in the next version.
    Second: you can’t use it that way (because it is a hidden field, and the value there has no relation to whatever you choose for seat value).
    If you want something more complicated, you need to read up the documentation concerning discount filters here: https://www.e-dynamics.be/wordpress/category/documentation/12-hooks-and-filters/

    #59276
    Anonymous
    Inactive

    Thanks for your reply Franky.

    If the hidden field doesn’t apply a discount to the RSVP, what did you mean when you said “use a conditional tag around that field and you’re good to go.” I am using a conditional tag so that hidden Custom Field only appears when a member is logged in. (That is working correctly!)

    If the “extra charge” functionality doesn’t add/remove an amount to the order automatically, how does it work? What did you have in mind when you wrote the message last Friday?

    #59277
    Franky
    Keymaster

    I said that because of the simple use case you had: check if the user is in a certain group and then apply a discount. Without coding, that works for a simple fixed discount, but not for multiprice and different discount amounts.
    If you want that, you’ll need to start coding some small things yourself (like mentioned in the filters documentation).

    #59278
    Anonymous
    Inactive

    Okay that makes sense! But what about if I just want to apply a fixed discount? That does not work yet for me. Is it because of the bug in the negative value not appearing?

    #59279
    Franky
    Keymaster

    Indeed, that should be fixed with this:
    https://plugins.trac.wordpress.org/changeset/2006005

    #59280
    Franky
    Keymaster

    Btw: your idea for discounts might not be so bad 🙂
    I’ll take a look at maybe just take multiprice-discounts into account too.

    #59281
    Anonymous
    Inactive

    Your bugfix worked perfectly! Not only is the value in the hidden field now (I can see your switch statement needed those extra lines), but I can see the price change including that discount with the #_DYNAMICPRICE placeholder. (Just discovered that, very cool!)

    This is a great first step for me to learn more things about EME. However, of course what I actually need is quite a bit more complex and will obviously need to use a code-type Discount.

    The functionality I need to create sounds simple but is probably complex to create by hand:

    Members are allowed to get 1 free ticket for certain events.

    Luckily, the logic works out that Members should always get the most expensive tickets. Please let me know if what I need is impossible. I imagine it is possible with the right PHP. I think I know just enough PHP to get it done correctly. Wish me luck!

    #59287
    Anonymous
    Inactive

    Okay, I’ve been working hard on this and with the help of #_USER_BOOKEDSEATS I think I’ve cracked the challenge.

    For each price, I created a unique custom field for exactly that amount of discount (negative extra charge). If the user is a member AND has no booked seats (nested IF statements), then the custom field that matches the right price level is added into the form. So in effect, members get a negative extra charge that matches the price of a single ticket at the available price level, but only if they have no bookings already (so they only get 1 ticket included with membership).

    It seems to work so far. I just need to separate the seat fields into 2 separate blocks, one for members and one for non-members given UX considerations.

    #59294
    Anonymous
    Inactive

    Here’s what my non-member and member blocks look like. Hopefully it helps someone else set up complex conditionals like this! The different #_FIELD{n} placeholders refer to my Custom Fields each of which has a negative extra charge matching the price of the seats in question.

    Also note that non-members see a couple levels of tickets at a time if there are only 4 or less seats available in the previous price. I used nested conditionals, since EME cannot do multiple conditions in one [eme_if] tag, nor can it do else statements.

    [eme_if tag='#_IS_USER_MEMBER_OF{MyMembershipName}' eq=0]
    	           [eme_if2 tag='#_AVAILABLESPACES{1}' gt=0]<tr><th scope='row'>Early (#_PRICE{1} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{1} left!</small></th><td>#_SEATS{1}</td></tr>[/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{1}' le=4][eme_if3 tag='#_AVAILABLESPACES{2}' gt=0]<tr><th scope='row'>General seating (#_PRICE{2} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{2} left!</small></th><td>#_SEATS{2}</td></tr>[/eme_if3][/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{2}' le=4][eme_if3 tag='#_AVAILABLESPACES{3}' gt=0]<tr><th scope='row'>Late (#_PRICE{3} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{3} left!</small></th><td>#_SEATS{3}</td></tr>[/eme_if3][/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{3}' le=4][eme_if3 tag='#_AVAILABLESPACES{4}' gt=0]<tr><th scope='row'>Very late (#_PRICE{4} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{4} left!</small></th><td>#_SEATS{4}</td></tr>[/eme_if3][/eme_if2]
               [/eme_if]
    
               [eme_if tag='#_IS_USER_MEMBER_OF{MyMembershipName}' eq=1]
    	           [eme_if2 tag='#_AVAILABLESPACES{1}' gt=0]<tr><th scope='row'>Early (#_PRICE{1} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{1} left!</small></th><td>#_SEATS{1}[eme_if3 tag='#_USER_BOOKEDSEATS' lt=1]#_FIELD{1}[/eme_if3]</td></tr>[/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{1}' eq=0][eme_if3 tag='#_AVAILABLESPACES{2}' gt=0]<tr><th scope='row'>General seating (#_PRICE{2} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{2} left!</small></th><td>#_SEATS{2}[eme_if4 tag='#_USER_BOOKEDSEATS' lt=1]#_FIELD{2}[/eme_if4]</td></tr>[/eme_if3][/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{2}' eq=0][eme_if3 tag='#_AVAILABLESPACES{3}' gt=0]<tr><th scope='row'>Late (#_PRICE{3} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{3} left!</small></th><td>#_SEATS{3}[eme_if4 tag='#_USER_BOOKEDSEATS' lt=1]#_FIELD{3}[/eme_if4]</td></tr>[/eme_if3][/eme_if2]
    
    	           [eme_if2 tag='#_AVAILABLESPACES{3}' eq=0][eme_if3 tag='#_AVAILABLESPACES{4}' gt=0]<tr><th scope='row'>Very late (#_PRICE{4} ea.):<br /><small class="my-spacesleft-class">only #_AVAILABLESPACES{4} left!</small></th><td>#_SEATS{4}[eme_if4 tag='#_USER_BOOKEDSEATS' lt=1]#_FIELD{4}[/eme_if4]</td></tr>[/eme_if3][/eme_if2]
               [/eme_if]
Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top