Home › Forums › Ticket Products › Event Tickets Plus › Show hightest priced ticket price, instead of lowest?
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
Geoff.
-
AuthorPosts
-
May 23, 2015 at 3:18 pm #964671
Tevya
ParticipantHi, we’ve got a normal ticket, or a “reserve your spot” deposit. It shows the lower priced one, on the list of events, as well as at the top of the individual event CPT. We want to only show the higher/highest price, since that’s the actual cost of the ticket. Is there a way to do this?
Additionally, is there a way to have both kinds of tickets use the same “pool” or “seats”? So if we have 10 spots, we don’t want to allocate 5 to the full price and 5 to the deposit. We just want 10 total, and 1 gets removed for each ticket purchased, regardless of whether it’s the full price or the deposit-only amount. Is that possible currently? If not, any chances it’s being worked on?
May 25, 2015 at 8:41 am #964814Geoff
MemberHi Tevya, thanks for getting in touch!
You can certainly replace the cost information in those template with the tribe_get_maximum_cost() function instead. That will ensure that the maximum price is always used in those spots.
For example, you can do that on the event page by:
- Make a copy of the single-event.php file. It’s located in /plugins/the-events-calendar/views/single-event.php.
- Make a new folder in your theme files called tribe-events
- Move the copied file to that folder
Now that the file is in your theme, you can modify it to suit you needs. In this case, replace this:
[php]<?php echo tribe_get_cost( null, true ) ?>[/php]
…with this:
[php]<?php echo tribe_get_maximum_cost ( ) ?>[/php]
You can follow the same process for other instances where the cost is displayed.
Additionally, is there a way to have both kinds of tickets use the same “pool” or “seats”?
Good question! I really wish there was a way to do this, but I’m afraid it’s not possible yet. It is indeed something we recently started working on, but it’s still a ways down the road. You can add your vote for the feature here and that will notify you when there are updates on our progress.
Does this help answer your questions? Please let me know. 🙂
Cheers!
GeoffMay 25, 2015 at 12:36 pm #964893Tevya
ParticipantThanks Geoff. I’d hoped to avoid child themes and such like that, since it causes things to get messy as plugins and themes get updated. I’m very comfortable with Child themes and all that, I just prefer to avoid them and keep them as simple as possible. So would it be possible to programmatically change just that line, like in a plugin (or functions.php) without having to duplicate that entire file? I’d much rather have a little plugin or snippet that exists outside the theme, to take care of this. Though I’m very familiar with WP, I’m not a programmer. So I’m just wondering if this would be possible?
May 25, 2015 at 12:39 pm #964894Tevya
ParticipantOh, and I meant to say thank you for linking to that upcoming solution on my 2nd issue. I hope you all will be able to get it done soon (though I know it’s a way out). I assume your devs have already thought of this, but just in case they haven’t, I’ll just paste what I said on Uservoice, to make sure someone sees it:
If I understand correctly, currently tickets add individual products in WooCommerce. I would think the simple fix would be to change it so each ticket is added as a variation. So you have 1 product for each event. Then various tickets are variations of that product.
From there this problem should be solved: WooCommerce allows you to set inventory at either the product or variation level. If you set it at the product level, (I believe) it sets the total available for all variations of that product. So then all you have to do is go into the product and set your inventory there, or you guys could include a field for “total tickets” in the “add tickets” part of the Event. But all it would have to do is set the inventory amount for the WooCommerce product, since now all tickets are variations of that product.
Hope that makes sense/is helpful. I could see other potential benefits from having tickets handled as variations (aka variable products) in WooCommerce, not just this fix.
May 25, 2015 at 2:16 pm #964903Geoff
MemberHey Tevya,
Thanks for following up! I also appreciate your kind words. 🙂
I do believe you could return the maximum cost programmatically, but I don’t have an exact snippet for that. I imagine it could be done by hooking into tribe_get_cost() function.
I don’t have a snippet handy, but was able to get something working with this:
https://gist.github.com/geoffgraham/bce1150e2930026d4c3e
You may need to tweak that up a bit, but hopefully it at least gets you started in the right direction. 🙂
Cheers!
GeoffMay 26, 2015 at 2:37 pm #965241Tevya
ParticipantThat’s super cool that you put that together.
I had removed the cheaper (deposit only) ticket, since we didn’t want to disappoint people when they found out the actual price was much higher. So I just now went in and added it back, to test your snippet. After adding it back, it’s still showing $1500 (the full-price) at the top of the event and on the event listing page. So I’m confused as to why it didn’t work before, but now works, but it’s working! Without your snippet or anything….
I’m totally confused, but am just glad it works. You can see here: http://birthlearning.com/class/advanced-doula-training-fall-2015/
You’ll notice both tickets are at the bottom of the page, but the price at the top is $1500 instead of the $200 it was displaying previously. Not sure why or how removing the $200 ticket then re-adding it later, made it work, but it did.
May 27, 2015 at 7:04 am #965313Geoff
MemberThat’s great! I wonder what was triggering that sort of behavior, but I’m glad that it worked seemed to work itself out. 🙂
I’ll go ahead and close this thread but do please feel free to open a new one if other questions pop up–we’d definitely be happy to help.
Cheers!
Geoff -
AuthorPosts
- The topic ‘Show hightest priced ticket price, instead of lowest?’ is closed to new replies.
