Events Made Easy › Forums › Bug fixed or feature request implemented › Add total (price) in RSVP email
- This topic has 7 replies, 2 voices, and was last updated 12 years, 8 months ago by Franky.
-
AuthorPosts
-
Sat 25 Feb 2012 at 13:35 #43736AnonymousInactive
I would like to know whether it’s possible to include a total price in the RSVP e-mail.
I am trying to do the following:
Send the user an email when their registration is pending. In this email I mention how they can pay for the event (transfer money to bank account)
After they payment has been verified by me I set the status to paid and approve the registration.
In this first email (registration pending) I would like to mention the total amount they will have to pay. Basically it is “#_SPACES x #_PRICE”. It would be nice however to be able to mention the total price. Then it would say “€ 15” instead of “3 x € 5”).
Can this be done already or else could you include this in the plugin?
Sat 25 Feb 2012 at 15:02 #49425FrankyKeymasterDone in trunk:
Sat 25 Feb 2012 at 20:23 #49426FrankyKeymasterand for a typo fix: http://plugins.trac.wordpress.org/changeset/510524
Sat 3 Mar 2012 at 10:17 #49427AnonymousInactiveI tried adding this code into eme_rsvp.php of the latest release (1.0.1) but found that it is not working. The price shown in the e-mail is the price for 1 ticket (although I use #_TOTALPRICE). It probably depends on some other changes in the code since the release of 1.0.1.
Since I need this feature as soon as possible, what should I do to get this working?
Or do you recommend me to use the development version (how safe is it to use)?
Sat 3 Mar 2012 at 12:00 #49428FrankyKeymasterHmm … it should work just fine, and is not dependent on other code. You did the 2 fixes mentioned above? I’ll test it out later today myself.
Sat 3 Mar 2012 at 12:15 #49429FrankyKeymasterOk, found it. Another regex was catching the PRICE first. Fixed here:
Sun 4 Mar 2012 at 14:11 #49430AnonymousInactiveThanks Franky, #_TOTALPRICE is working now.
I have two suggestions:
Since a price is a number with 2 decimals, I’ve added an extra line to display 2 decimals instead of the default (7.50 would display 7.5 as #_TOTALPRICE for example).
In my case #_TOTALPRICE now outputs 7,50.
The code of eme_rsvp.php now looks like:
// one for total price to pay
$total_price=$booking*$event;
$total_price = number_format($total_price, 2, ‘,’, ‘ ‘);
Here you see I’ve also added a “,” instead of “.”. This is because in The Netherlands we work with comma as a decimal separator.
Maybe that’s an option to include in EME: choose a decimal separator (. or ,)
Sun 4 Mar 2012 at 18:41 #49431FrankyKeymasterThese are new feature requests, you might want to add a new post for these. Also: normally I’d use the php money_format for these, but that depends on the locale and the price can be in a different currency. In so many ways wordpress is lacking default options (decimals precision and seperator should be wordpress options).
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.