Events Made Easy › Forums › Bug fixed or feature request implemented › #_PRICEPERBOOKING placeholder
Tagged: placeholder
- This topic has 12 replies, 2 voices, and was last updated 10 years, 6 months ago by Franky.
-
AuthorPosts
-
Tue 20 May 2014 at 03:13 #52200AnonymousInactive
I would like to have a #_PRICEPERBOOKING or #_PRICEPERSEAT placeholder that can be used in the RSVP process. For example, I’ve implemented a coupon code system using a variation of the discount example that you provided on the FAQ page. However, I have no way of showing the registrant the new price per seat after the coupon code has been applied. All I can show is the total booking price. What I’d like to do is format the payment form header like this:
<p>Thanks for registering! You have reserved #_RESPSPACES at $#_PRICEPERSEAT per space. <strong>Total due: $#_TOTALPRICE</strong>
Tue 20 May 2014 at 17:11 #52205FrankyKeymasterImplementing discounts directly is on my (very big) to-do list …
But can’t you just say
<p>Thanks for registering! You have reserved #_RESPSPACES at $#_PRICE per space (with a discount of $#_FIELD{1} per space). <strong>Total due: $#_TOTALPRICE</strong>
I’ll take a look too as how easy it would be to implement the “#_PRICEPERSEAT” placeholder
Tue 20 May 2014 at 17:35 #52210AnonymousInactive#_PRICE is the event price, which doesn’t change with the tweak that I’ve implemented. The booking price is what changes, and there’s currently no placeholder for that value. That’s essentially what #_PRICEPERSEAT would be. I suppose it could be called #_BOOKINGPRICE to be closer to other placeholder naming conventions.
Tue 20 May 2014 at 17:37 #52211AnonymousInactiveAlso, #_FIELD{1} is the coupon code that was entered by the registrant (ie. “DISC25”), not the discount applied by that coupon. I haven’t yet found a way to pass that value through from the
functions.php
override.Tue 20 May 2014 at 17:53 #52213FrankyKeymasterYes, you’re correct about #_FIELD{1}. I believe the custom attributes is what you’re looking for in that case:
Tue 20 May 2014 at 18:11 #52214AnonymousInactiveBut how do I know when to insert those attributes? If someone doesn’t use the coupon code, they shouldn’t see the discount info. Without an indicator of whether or not the code worked, I don’t know whether or not to display the discount info.
Here’s a possible solution: in addition to changing the price when validating the coupon code, I could append something unique to the end of the booking comment and save that back to the database as well. Then on the payment page, I could use a conditional tag to look for that content inside the comment and display the appropriate info.
Time for more testing… 🙂
Tue 20 May 2014 at 18:58 #52216AnonymousInactiveOkay, so I’ve hit a snag using custom attributes. From what I understand in the docs, I need to first use them somewhere in the settings, and then they’ll be available to customize in my events. However, they’re not showing up in the event Attributes section.
Here’s what I have now for my Payment form header format:
<p>Thanks for registering! You have reserved #_RESPSPACES at $#_PRICE per space.</p> [eme_if tag='#ESC_FIELD{1}'] <p>Coupon code <strong>#_FIELD{1}</strong>: [eme_if2 tag='#ESC_RESPCOMMENT' notcontains='[XXXXX]']Invalid[/eme_if2] [eme_if2 tag='#ESC_FIELD{1}' value='YYYYY']Valid. Price per space reduced to #_ATT{yyyyy}[/eme_if2] [eme_if2 tag='#ESC_FIELD{1}' value='yyyyy']Valid. Price per space reduced to #_ATT{yyyyy}[/eme_if2] </p> [/eme_if]. <p><strong>Total due: $#_TOTALPRICE</strong></p>
Based on that, I should have a “yyyyy” attribute that I can customize for my events, but it’s not there. The Attributes section is still empty, telling me that I have to add them in the settings first. I’ve reloaded the event edit page, and even started to make a new event, but still no attributes.
Could it have something to do with the fact that they’re inside some conditional placeholders (and nested ones at that)?
Tue 20 May 2014 at 19:36 #52217AnonymousInactiveJust ran a quick test with a couple custom attributes outside of the conditional placeholders. Still not appearing on the event editing page.
Wed 21 May 2014 at 10:08 #52219FrankyKeymasterThat might be a bug. I need to specify which formats are checked for custom attributes, but sometimes I forget to add the new settings I created. I’ll check this evening.
Thu 22 May 2014 at 00:07 #52237FrankyKeymasterConcerning the price per seat, did you try the #_TOTALPRICE and #_TOTALPRICE{1} (etc) placeholders? These already exist and should take any discounts into account.
They are also documented btw: http://www.e-dynamics.be/wordpress/?cat=27 , but the doc didn’t say that the eme_insert_rsvp_action was taken into account, has been updated.Thu 22 May 2014 at 00:13 #52238FrankyKeymasterok, the payment header and footer format will also be checked for custom attributes in the next version.
Thu 22 May 2014 at 17:44 #52240AnonymousInactiveI’m already using the #_TOTALPRICE placeholder, which displays the sum of all booked seats. However, there’s no way (that I can find) to break that back down to a per-seat value if multiple seats are purchased. That’s what I’m hoping to get.
The #_TOTALPRICE{1} placeholder only works for multi-price events, but my events aren’t really multi-price; i.e. the applicant can’t choose prices from a list of options. There’s the regular price, and the discount price if the applicant uses the correct coupon code.
Thu 22 May 2014 at 20:31 #52245FrankyKeymasterOk, I see what you mean now. This change should help you:
http://plugins.trac.wordpress.org/changeset/919560 (just the change in eme_rsvp is relevant for this part)
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.