- This topic has 1 reply, 2 voices, and was last updated 1 year, 12 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Multiprice in loop
Hi Franky,
back again with a question:
In a RSVP-Mail-Template i have included a other template by using. #_INCLUDE_TEMPLATE{5}.
Now in the TEMPLATE{5} I want to show the booking of a multiprice-event with 3 different prices:
[eme_if tag='#_IS_MULTIPRICE' value='1']
Booked:
[eme_for min='1' max='#_EVENTPRICE'] #_RESPSEATS{#_LOOPCOUNTER} á #_EVENTPRICE{#_LOOPCOUNTER}
[/eme_for][/eme_if]
The Result is (by a eventprice of 5.00||7.00||10.00):
#_RESPSEATS{1} á #_EVENTPRICE{1}
#_RESPSEATS{1} á #_EVENTPRICE{1}
#_RESPSEATS{1} á #_EVENTPRICE{1}
#_RESPSEATS{1} á #_EVENTPRICE{1}
#_RESPSEATS{1} á #_EVENTPRICE{1}
but should be:
5 á 5.00
3 á 7.00
2 á 10.00
Thank you for help!
Multiple things here:
since #_EVENTPRICE will be a multiple, using that as a max is not logical. If you have 3 price categories, try:
[eme_for min='1' max='3'] #_RESPSEATS{#_LOOPCOUNTER} á #_EVENTPRICE{#_LOOPCOUNTER}
[/eme_for]
Also: I don’t think it will work, since I need to replace the placeholders at a certain point, and currently I replace these before executing the eme_for-loop (since typically the min/max is based on a list generated by the event in some way), the same way as I do it for eme_if btw. So, since an event is multiprice, it won’t replace “#_RESPSEATS” and leave that string as is, but only replace #_LOOPCOUNTER (since that’s only known in the eme_for shortcode). So currently the logic is:
replace event+rsvp placeholders, resulting in the text
[eme_for min='1' max='3'] #_RESPSEATS{#_LOOPCOUNTER} á #_EVENTPRICE{#_LOOPCOUNTER}
[/eme_for]
Then do eme_for shortcode and replace eme_for placeholder #_LOOPCOUNTER), resulting in the displayed final text:
#_RESPSEATS{1} á #_EVENTPRICE{1}
#_RESPSEATS{2} á #_EVENTPRICE{2}
#_RESPSEATS{3} á #_EVENTPRICE{3}