Posted: May 23, 2015 at 2:57 am
Hi! I have a question regarding events with multiple ticket variations and attached prices. I have an event with three prices: €28,- / €15,- / €5,- The problem is that when I look at the single event page, I can see “prices from: €28,-” while this should be “prices from: €5,-” How can I resolve this? Thanks alot in advance. |
|
Link to the event: http://www.zeeheldentheater.nl/new/events/pindakaas-met-sambal-2-0-4-2/ |
|
Hi Arjan, I’m seeing different pricing than what was shared in your example. Were you able to resolve this issue? — |
|
Hello Lorenzo, Thanks for your reply. I’m going to share with you this event example: There are multiple issues now: Screenshots of this Event settings: Thanks |
|
Code I used for prices and date of event. |
|
|
Hi, 1) This is custom code, so I would advise you to re-examine it. For instance, the first_ticket() does not necessary mean the first one in order, usually it means the first one created http://take.ms/p71EW You may want to try primary_datetime() or use datetimes_ordered() then loop through the resulting array looking for the datetime name, then pull the ticket from that. 2) Please try setting the time to UTC+2 3) The above may assist with this, but also please check your custom code as I am unsure what your day_conversation() and month_conversation() functions refer to. 4) Did you type in the text initially, or paste it in? Can you test with a default theme please? (Theme Test Drive plugin is very useful for this! https://wordpress.org/plugins/theme-test-drive/ ) |
Hi Dean, Thanks for your reply. Issues 2,3 are resolved now. The UTC+2 did the trick and the Day display error was a misinterpreted translation from the foreign coders in functions.php Still dealing with 1 and 4. 4 I am going to test and look for a solution myself. Regarding 1: Do you have a correct line of code to display ‘Prices: From’ as in where the cheapest price would be €4,25 it would display ‘Prices from: €4,25’ ? Using EE4. Thanks alot. |
|
Hi Arjan, I have an example for the events table view template add-on but you should be able to adapt it for your use case. See this tutorial: https://gist.github.com/lorenzocaum/ef6afefd07c9c5f6f681 — |
|
Hi Lorenzo, I used your code to display “pricing from” but it still doesn’t show the cheapest price. In this example I have 20 tickets of €4.25 but it still shows pricing from €8.50 |
|
I used the following code: <?php // grab array of EE_Ticket objects for event ?> |
|
After testing it seems that it displays the price of the ticket that is created first and not the ticket that has the lowest price, which is what I want. |
|
Try this instead: — |
|
That code didn’t work for me. I’ve adjusted it with help from my colleague and this works: <?php |
|
That code didn’t work for me. I’ve adjusted it with help from my colleague and this works: <?php Thanks for your help! |
|
|
Hi, Anything else we can help with or may we mark this as resolved? |
There’s one more thing; Is there a piece of code which I can use to display only the full event description text on the frontend? |
|
Hi Arjan, events are stored as custom post types so you can display the content if you know the post ID (event ID). This also works for the excerpt (event summary). — |
|
I see, but this code displays all the info of an event, and I just need the full text description. (not the excerpt) <?php |
|
Last issue is solved! |
|
Hi Arjan, I’m curious if I misunderstood your prior question. Could you let us know how to resolved your prior issue regarding getting the event description? — |
|
Hi Lorenzo. sure. First is used this code to display the event description: But then the text came out as a big lump of text without paragraphs. Then I used this and that did the trick After that I had to filter out the event text description by hiding all the other elements with CSS. (ticket selector, etc.) Would be nicer if you just had template tags for displaying individual elements. |
|
Thanks Arjan, that is what I was referring to. Enjoy your week! — |
|
The support post ‘Prices 'From' Price range on single event page.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.