Home › Forums › Ticket Products › Event Tickets Plus › All events shown as free
- This topic has 8 replies, 3 voices, and was last updated 7 years, 2 months ago by Damien.
-
AuthorPosts
-
January 17, 2017 at 9:54 am #1219708DamienParticipant
Hello
We are using Events Tickets Plus without an e-commerce platform such as Woocommerce. We don’t need to take payment for the events but needed the extra control of using Event Tickets Plus.The problem is that once the tickets addon is installed it hides the cost field for all events so they all show up as Free events.
We nearly got around this by adding the following code to our functions file:add_filter( 'tribe_events_admin_show_cost_field', '__return_true', 100 );
This now allows us to add the cost of the event. However on the front end of the site the events still show as free but now have the cost next the Free statement. eg. ‘Free – £25’.
I can’t see how to get rid of the Free from here when a price has been added.
Any ideas? It seems the tickets plus only works if you want to accept payment online.
Many thanks
DJanuary 17, 2017 at 2:24 pm #1219874Geoff B.MemberGood evening Damien and welcome back!
Thank you for reaching out to us.
I would love to help you with this topic.To get the cost field back, we actually have an extension: https://theeventscalendar.com/extensions/display-the-event-cost-field-when-ticket-plugins-are-installed/
As for the Free mention, this usually stems from using RSVP tickets.
You can remove the “free” mention by adding the following snippet to your theme’s functions.php file: https://gist.github.com/GeoffEW/b440feef873af841d023c0bf0839e93fLet me know how that goes.
Best regards,
Geoff B.January 18, 2017 at 1:49 am #1220146DamienParticipantThanks for the response Geoff.
I had already tried that snippet, which I found in the forums somewhere.Unfortunately that seems to remove the whole cost field from the front end altogether. It removes the ‘Free’ but also removes any mention of the cost.
What we would like is for it to show ‘Free’ when it is a free event but also show the cost when it is not free. Currently if there is a cost for the event it shows up as ‘Free – £84’! So it shows the cost but it still says Free next to it.
You can see what I mean here.
Is this possible?
Thanks
D
January 19, 2017 at 12:03 am #1220789Geoff B.MemberGood evening Damien,
I am pretty sure you can achieve what you are looking for with my colleague Andras’ snippet: https://theeventscalendar.com/support/forums/topic/show-a-price-in-rsvp-mode/#post-1174666
Let me know if that helps.
Have a great day!
Geoff B.
January 19, 2017 at 1:56 am #1220828DamienParticipantThanks Geoff
The snippet looks like it should work but unfortunately it just seems to remove the entire cost field from the front end as per the previous snippet.
Any ideas why?Thanks
D
January 19, 2017 at 11:09 pm #1221381Geoff B.MemberGood evening Damien,
I am sorry this did not work as intended!
I am just noticing that your Event Tickets Plus does not seem to be up to date.
Not that this is necessarily related, but it’s better to have matching version of Event Tickets and Event Tickets Plus.Secondly, could you send me screenshots of the Edit Event and Edit Ticket(s) screens for a sample event on your website.
Finally, could you please send me a copy of the latest version of your WordPress theme / child theme via a link to a .zip file link (stored Dropbox or Google Drive) so that I can run some tests on my end ? I recommend a private reply for that purpose.
Please ensure you are using the latest files as found on your actual website.
This way I will get access to any updates or customizations you might have made.Hang in there as we investigate this together.
Best regards,
Geoff B.
January 24, 2017 at 4:26 am #1222861DamienParticipantHi Geoff
I’ve finally got this figured out!
Firstly because this is on a multisite using a child theme. I had to place the snippet in the functions file in the child theme, rather than the main theme functions. I don’t know why this should matter.
Secondly I managed to get it to keep the ‘Free’ block by amending the snippet slightly to this:<?php /* * The Events Calendar - Remove 'Free - ' from price * Add to your child theme's functions.php file */ add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 ); function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) { if ( $cost != 0 || $cost != 'Free' ) { $cost = str_replace('Free', '', $cost); $cost = str_replace(' - ', '', $cost); } return $cost; } ?>
Hopefully this is of use to someone else out there trying to achieve the same thing.
Thanks for all your help.
D
January 24, 2017 at 1:58 pm #1223194Geoff B.MemberGood evening Damien,
Well done!
And most of all, thank you for sharing this solution for all to use.
You are right, whenever you can, using the child theme’s functions.php is the way to go.
You are welcome back in our support forums any time 🙂
For now, I am going to close this thread.
Have a great week!
Geoff B.
-
AuthorPosts
- The topic ‘All events shown as free’ is closed to new replies.