List view with discounted prices

Home Forums Calendar Products Events Calendar PRO List view with discounted prices

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1187143
    Rob
    Participant

    I would like to show the discounted price and original price (crossed out) of the event tickets in the listview calender. How can I do that ?

    #1187594
    Geoff
    Member

    Hi Rob,

    Do you happen to know where the discounted price data is coming from? Is that a custom field from Events Calendar PRO or something that is configured with another plugin?

    Once you know where and how to fetch that data, you can override the List View template (using the same sort of process we chatted about in another thread) to add the code for the discounted price.

    The exact template you would override is:
    /the-events-calendar/src/views/list/single-event.php

    Once you’re in the template, you can strikethrough the original cost by changing this:

    <span><?php echo tribe_get_cost( null, true ); ?></span>

    … to this:

    <span><strike><?php echo tribe_get_cost( null, true ); ?></strike></span>

    Cheers!
    Geoff

    #1188110
    Rob
    Participant

    The discounted price is actually the woocommerce sales price during the scheduled timings

    #1188620
    Geoff
    Member

    Cool, thanks for confirming that!

    You’ll want to refer to the WooCommerce docs for how the discounted price is fetched from the data but, once you have it, you can add it next to the original event cost that I mentioned above.

    Cheers!
    Geoff

    #1189052
    Rob
    Participant

    The view/list/single-event.php
    only exists in the events-calander (free)

    When I place that file in
    <theme>/tribe-events/list/single.event.php

    Then the listview (all the events) is overwritten… that is correct
    However even without changing anything to the single-event.php the design is suddenly totally different
    HUGE image, title on top of image and other designs…

    I do not understand what is going on…

    #1189066
    Geoff
    Member

    Hi Rob,

    If I remember correctly, you are using the Avada theme — is that correct?

    The reason I ask is because it contains its own customizations of The Events Calendar. That means copying the template file from our plugin will not only overwrite the plugin’s code, but will overwrite the theme’s customizations as well.

    If you are making edits directly in the theme files, then there is no need to overwrite the list/single-event.php that is already in the theme’s tribe-events/list folder. You can make those edits using the template that are already there.

    Cheers,
    Geoff

    #1189075
    Rob
    Participant

    BRilliant…thanks

    #1189076
    Geoff
    Member

    My pleasure!

    #1199744
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘List view with discounted prices’ is closed to new replies.