Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #60740
    Anonymous
    Inactive

    How do I enable a variable membership fee? I want to charge a base fee for one person but charge additional fee for additional people. When I created a custom field, it did change the amount but not by the expected value. For example, I created a membership form with a cost of $150. I added a custom field with extra charge added of type drop down with multiple values, 0,150,248 with labels of 1,2,3 The expectation would be that if I change the drop down to 3, I would charge $150 + $238 for $388 total. Instead, it came up with 277.00.

    #60757
    Franky
    Keymaster

    That’s of course not the way it should be. I’ll move this to bugs, so I don’t forget to test this later on. Also: when adding extra fields to the form, these are taken into account for the first membership fee, but not for additional membership extensions. But let’s start with the bug 🙂

    #60762
    Franky
    Keymaster

    Ok, currently fields with extra charge are not taken into account, this has now been fixed in production, see https://plugins.trac.wordpress.org/changeset/2236005/
    or download and replace eme_members.php: https://plugins.trac.wordpress.org/browser/events-made-easy/trunk/eme_members.php?rev=2236005&format=txt

    Btw: the extra charge is taken into account on each extension as well.

    #60768
    Anonymous
    Inactive

    Thanks, let me give that a try.

    #60769
    Anonymous
    Inactive

    I still get the total of $277 … it seems that any time the total is over $277, it changes the value to $277.

    #60770
    Anonymous
    Inactive

    I wonder if the issue has to do with the fact that the price and discounts are stored as text not decimal in the database.

    #60772
    Franky
    Keymaster

    Ok, I think you forgot to mention discounts (that currently won’t work with memberships, it hasn’t been implemented yet, reason being I never got around to figuring out if the discount can be re-applied or not upon extension).
    For your page: can you give an example? What OS/php are you running on? I’ll try to replicate example (not OS) then too (or give me a temp admin account on your server).

    #60774
    Anonymous
    Inactive

    There are no discounts being applied. The set up is simple

    Membership is yearly with a base value of 150:

    Template is:

    number of Scouts to Register: #_FIELD{NumScouts}
    <h3>Parent Information:</h3>
    <table>
    <tbody>
    <tr>
    <th>First Name:</th>
    <td>#_FIRSTNAME</td>
    <th>Last Name:</th>
    <td>#_LASTNAME</td>
    </tr>
    <tr>
    <th>Address:</th>
    <td>#_ADDRESS1</td>
    <th>Address 2:</th>
    <td>#_ADDRESS2</td>
    </tr>
    <tr>
    <th>City:</th>
    <td>#REQ_CITY</td>
    <th>State:</th>
    <td>#REQ_STATE</td>
    </tr>
    <tr>
    <th>Zip:</th>
    <td>#REQ_ZIP</td>
    <th>Phone number:</th>
    <td>#REQ_PHONE</td>
    </tr>
    <tr>
    <th>E-Mail:</th>
    <td>#REQ_EMAIL</td>
    </tr>
    </tbody>
    </table>
    #_DYNAMICDATA
    #_CAPTCHA
    #_SUBMIT{Register}

    Where #_FIELD{NumScouts} is a Dropdown Members field with values of 0||100|178, labels 1||2||3 and set with extra charge and required.

    #_DYNAMICDATA refers to the following template:

    <h3>Scout 1 Information:</h3>
    Upload Medical Form:#_FIELD{Scout Medical}
    <table>
    <tbody>
    <tr>
    <td>First Name:</td>
    <td>#_FIELD{Scout First Name}</td>
    <td>Last Name:</td>
    <td>#_FIELD{Scout Last Name}</td>
    </tr>
    <tr>
    <td>Grade*:</td>
    <td>#_FIELD{Scout Grade}</td>
    <td>School:</td>
    <td>#_FIELD{Scout School}</td>
    <td>Den:</td>
    <td>#_FIELD{Scout Den Num}</td>
    </tr>
    </tbody>
    </table>

    #60775
    Anonymous
    Inactive

    Figured out the issue:

    Database: wp_eme_members
    field: extra_charge is a Tiny INT
    it has to be an INT since a Tiny INT is from -127 to 127…

    updating the database field extra_charge to INT fixes the issue.

    #60777
    Franky
    Keymaster

    Nice find! The code change was needed (certainly for #_DYNAMICPRICE and the amount shown in the thank-you message and such), but the type-change of course was also needed. I now changed it to be the same as for bookings (tinytext in fact, so you can use +/- floating point too).

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top