Home › Forums › Calendar Products › Events Calendar PRO › "Free" not showing up
- This topic has 15 replies, 4 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
December 10, 2015 at 7:11 am #1038862
BARBARA DIGANGI-KELLY
ParticipantWe are no longer able to show “FREE” even though $0 is entered in cost field. Cost for events with any price other than $0 render on the site; “FREE” consistently does not render.
December 10, 2015 at 8:03 am #1038893George
ParticipantHey @Barbara,
This is unfortunately a consequence of the cost field requiring integers for values, not strings. You can only change this, at this time, by adding the following code snippet to your theme’s functions.php file:
add_filter( 'tribe_get_cost', 'cost_show_full_meta_field', 10, 2 );function cost_show_full_meta_field( $cost, $post_id ) {
$full_cost = tribe_get_event_meta( $post_id, '_EventCost', false );if ( isset( $full_cost[0] ) ) {
return sanitize_text_field( $full_cost[0] );
}return $cost;
}
I hope that helps! I’m sorry that this is required at this time 🙁
Sincerely,
GeorgeDecember 10, 2015 at 9:23 am #1038964Daniel Maier
ParticipantWhat is this function supposed to do? I didn’t see any changes nor the word “FREE” come back to events that have cost set to “0”.
“Enter a 0 for events that are free or leave blank to hide the field.”
With or without the function it did not process any string on the cost field. It displays an error.
Also the cost field should not allow us to add anything other than numbers (integers values). However, the plugin allows that and it displays an error similar to this one:Warning: max(): Array must contain at least one element in …\wp-content\plugins\the-events-calendar\src\Tribe\Cost_Utils.php on line 296 Warning: array_merge(): Argument #1 is not an array in …\wp-content\plugins\the-events-calendar\src\Tribe\Cost_Utils.php on line 307 Warning: Invalid argument supplied for foreach() in …\wp-content\plugins\the-events-calendar\src\Tribe\Cost_Utils.php on line 309
Please make the field only accept the data that it is intended to receive. Also please fix the cost: free that is not working.
Thank you!
December 10, 2015 at 9:27 am #1038967Daniel Maier
ParticipantThe cost information, when set to ‘0’ (free) is also not being displayed in the event meta details area.
December 10, 2015 at 1:13 pm #1039117George
ParticipantHi Daniel,
I’m sorry about this, and this is a bug we are working on. For now you can remove that snippet if it does not help; I would recommend then just using “0” (without quotes of course) as the price for free events.
Stay tuned to our maintenance release coming soon, and update to it – see if things are improved!
Thank you,
GeorgeDecember 10, 2015 at 1:14 pm #1039118Daniel Maier
ParticipantExcellent!
Please keep in mind when fixing the cost field that we also have a need for a cost range. For example, $10 – $50 tickets, etc.
Thanks George!
December 10, 2015 at 1:30 pm #1039133George
ParticipantHey Daniel,
I cannot promise that our cost field will fully support something like the cost “range” as you exemplified here; this may require both a new maintenance update and the code snippet I shared above.
Stay tuned to updates!
Thank you,
GeorgeDecember 10, 2015 at 1:35 pm #1039138Daniel Maier
ParticipantI will stay tuned. However, we have several events already setup to display costs on the following format “$10 – $20” as it was supported before.
By changing the cost field to integer this already broke our calendar and it is already displaying PHP errors.
It is very difficult to adapt to such changes.
Thanks for working on this.
December 11, 2015 at 10:54 am #1039737George
ParticipantI understand Daniel, and apologize for the inconveniences here! Stay tuned 🙂
December 11, 2015 at 10:58 am #1039742Daniel Maier
ParticipantThank you 🙂
December 12, 2015 at 9:46 am #1040228George
ParticipantNo problem @Daniel!
For further questions of your own, would you mind posting in a new and separate thread? I know it might seem trivial, but it really does help us handle various problems in a more organized way and to see each customer’s own unique issues to the end.
—
With that in mind, then:
@BARBARA – do you happen to have any thoughts on all of this? Or any further questions, comments, concerns? No worries if not, just checking in.
Cheers,
GeorgeDecember 29, 2015 at 10:12 am #1047884BARBARA DIGANGI-KELLY
ParticipantAny idea when this bug will be ironed out? We have many free events and not displaying FREE is a big issue for us.
In addition, the $sign is no longer displaying before the price. This is also a significant issue since a number without a $sign doesn’t communicate clearly at all.
December 31, 2015 at 5:15 pm #1048635George
ParticipantHey @Barbara,
I do not have news on the bug itself – however, I’m curious: have you tried out the solution I suggested in my very first reply to you on this thread? (Scroll to the top of this thread to find it). That might help with things a bit.
Cheers,
GeorgeJanuary 4, 2016 at 7:59 am #1049830BARBARA DIGANGI-KELLY
ParticipantHi George, wed did try the solution you suggested and it didn’t fix it — any update on this? Can you also let me know if the missing denomination signs is a known issue or would you prefer me to start a new thread about that?
January 4, 2016 at 9:18 am #1049912George
ParticipantHey @Barbara,
There’s unfortunately no update on this – to be fully honest, my last update was on New Year’s Eve, when we were all mostly “out of office” for the holidays. We’re all just coming back to work today so there has not been any development. Sorry to disappoint, just wanted to be up-front about where things stand!
There won’t be development happening fast enough for updates here in this thread – in terms of a proper bug fix within the code itself, the best thing I can recommend is just to check out the “Changelog” of new updates as they arrive in your dashboard, and/or to keep an eye on http://theeventscalendar.com/blog for update announcements.
—
Now, as for missing denomination signs, can you clarify exactly what you mean here? If you mean that, when you enter “$0” into the price field and the “$” gets removed, for example, then this unfortunately is resultant of the same bug affecting things when you try to enter “FREE” or something similar.
I really, really appreciate your patience with all of this!
Sincerely,
George -
AuthorPosts
- The topic ‘"Free" not showing up’ is closed to new replies.
