Home › Forums › Calendar Products › Events Calendar PRO › List view with discounted prices
- This topic has 9 replies, 4 voices, and was last updated 9 years, 4 months ago by
Rob.
-
AuthorPosts
-
November 3, 2016 at 9:45 am #1187143
Rob
ParticipantI 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 ?
November 4, 2016 at 1:16 am #1187594Geoff
MemberHi 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.phpOnce 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!
GeoffNovember 5, 2016 at 5:07 am #1188110Rob
ParticipantThe discounted price is actually the woocommerce sales price during the scheduled timings
November 7, 2016 at 8:13 am #1188620Geoff
MemberCool, 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!
GeoffNovember 8, 2016 at 6:23 am #1189052Rob
ParticipantThe view/list/single-event.php
only exists in the events-calander (free)When I place that file in
<theme>/tribe-events/list/single.event.phpThen 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…
November 8, 2016 at 7:02 am #1189066Geoff
MemberHi 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,
GeoffNovember 8, 2016 at 7:16 am #1189075Rob
ParticipantBRilliant…thanks
November 8, 2016 at 7:17 am #1189076Geoff
MemberMy pleasure!
November 30, 2016 at 8:35 am #1199744Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘List view with discounted prices’ is closed to new replies.
