"Free" not showing up

Home Forums Calendar Products Events Calendar PRO "Free" not showing up

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1038862

    We 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.

    #1038893
    George
    Participant

    Hey @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,
    George

    #1038964
    Daniel Maier
    Participant

    What 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!

    #1038967
    Daniel Maier
    Participant

    The cost information, when set to ‘0’ (free) is also not being displayed in the event meta details area.

    #1039117
    George
    Participant

    Hi 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,
    George

    #1039118
    Daniel Maier
    Participant

    Excellent!

    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!

    #1039133
    George
    Participant

    Hey 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,
    George

    #1039138
    Daniel Maier
    Participant

    I 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.

    #1039737
    George
    Participant

    I understand Daniel, and apologize for the inconveniences here! Stay tuned 🙂

    #1039742
    Daniel Maier
    Participant

    Thank you 🙂

    #1040228
    George
    Participant

    No 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,
    George

    #1047884

    Any 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.

    #1048635
    George
    Participant

    Hey @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,
    George

    #1049830

    Hi 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?

    #1049912
    George
    Participant

    Hey @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

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘"Free" not showing up’ is closed to new replies.