• Resolved Anonymous User

    (@anonymized-17294916)


    Is there a way to add a suffix to event cost?
    For example, I want for an event to show 50/month or 50 per month, or any other text that might come after the number. At the moment, I can currently type ’50/month’ or ’50 per month’ in the backend cost field, but the plugin will only look for the number and display that on the front end.
    Any code that can be added to accommodate this?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Disclaimer: I am not a developer
    This can be done quickly on the “list” view. I don’t know of a global way of doing this for all the views.
    I would strongly advise you to review this Customize the template to get an understanding of the approach.

    EDIT: /tribe/events/v2/list/event/cost.php
    replace line 28 <?php echo esc_html( $event->cost . ' /month' )?>

    Thread Starter Anonymous User

    (@anonymized-17294916)

    Thanks for that. I think doing that will change all the events’ cost to have /month, but I’d prefer it to be anything i.e. /year, /hour, /day

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @phaseism, thanks for reaching out. Yes, what @year2050 should be possible with Template Customization. However, since you would need other datetime format (/year, /hour, /day) it might not apply and would need more customization on your end. We do not have a workaround or a conditional custom snippet that would filter this on the backed to show on the pages.

    I encourage and recommend you to add it as a feature request, in this link: https://evnt.is/ideas, this would help us track users needing this feature.

    Nevertheless, I am unable to provide you an exact date for when this feature will be available or if it is possible. As our development team considers certain factors before implementing one like if a feature request has enough votes.

    Let me know if this helps or if you do have more questions.

    Best,
    Abz

    Thread Starter Anonymous User

    (@anonymized-17294916)

    Thanks @abzlevelup for getting back.
    Pardon my ignorance I’m not a developer by any means, but is there not an easier way to just change the field code to accept whatever is written in it, not just numbers?
    i.e. currently writing ’20’ in the cost field, will print 20 on the front end
    writing ’20/hour’ in the cost field, will print only 20, and remove ‘/hour’ on the front end
    writing ‘free’ in the cost field, will not print anything on the front end
    TLDR I want to be able to write anything in that cost field and for it to show on the front end.

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @phaseism, thanks for getting back to us.

    No worries, we do understand what you’re trying to accomplish here. However, we do not have any workaround for you since the price field needed to be numeric and altering it might cause different issues. There’s more to consider in doing this customization.

    Let me know if this helps.

    Best,
    Abz

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @phaseism,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Best,
    Abz

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Event cost suffix’ is closed to new replies.