Events Made Easy › Forums › Bug fixed or feature request implemented › Variable membership fee
- This topic has 9 replies, 2 voices, and was last updated 4 years, 9 months ago by Franky.
-
AuthorPosts
-
Thu 30 Jan 2020 at 02:39 #60740AnonymousInactive
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.
Thu 30 Jan 2020 at 15:04 #60757FrankyKeymasterThat’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 🙂
Thu 30 Jan 2020 at 20:18 #60762FrankyKeymasterOk, 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=txtBtw: the extra charge is taken into account on each extension as well.
Fri 31 Jan 2020 at 12:54 #60768AnonymousInactiveThanks, let me give that a try.
Fri 31 Jan 2020 at 13:11 #60769AnonymousInactiveI still get the total of $277 … it seems that any time the total is over $277, it changes the value to $277.
Fri 31 Jan 2020 at 13:43 #60770AnonymousInactiveI wonder if the issue has to do with the fact that the price and discounts are stored as text not decimal in the database.
Fri 31 Jan 2020 at 15:13 #60772FrankyKeymasterOk, 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).Fri 31 Jan 2020 at 21:28 #60774AnonymousInactiveThere 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>Fri 31 Jan 2020 at 22:06 #60775AnonymousInactiveFigured 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.
Sat 1 Feb 2020 at 09:31 #60777FrankyKeymasterNice 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).
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.