Support

Home Forums Event Espresso Premium Sale Pricing with strikethrough of regular price

Sale Pricing with strikethrough of regular price

Posted: March 25, 2021 at 9:39 am


mlevison

March 25, 2021 at 9:39 am

I’ve searched the forum and the only topic I found about this was:
https://eventespresso.com/topic/slash-pricing-sale-pricing-with-strikethrough-best-practice/
Unfortunately the person that asked the question never responded to the support person and there isn’t a fully formed solution to what we need.

I gather from Tony’s response that we should be able to add another input field to the ticket pricing that we can use to indicate the regular price. I’m not sure how to do that but I will see if I can figure that out.

We will also need to display the “regular” price on the purchase form somehow. I’ve added other filters to custom plugins to modify how the pricing is displayed but this would be adding another column to each ticket type row. How would I go about doing that?

Thanks


mlevison

April 1, 2021 at 3:31 pm

Can I get some guidance on how to best implement the pieces needed to accomplish this?
1. A way to specify the regular price of a ticket
2. A way to display the regular price on the event page to clearly present that this is what we normally charge (I can apply the necessary styling once it can be displayed)

Thanks


Tony

  • Support Staff

April 2, 2021 at 6:20 am

Hi there,

I gather from Tony’s response that we should be able to add another input field to the ticket pricing that we can use to indicate the regular price. I’m not sure how to do that but I will see if I can figure that out.

You can add another input to the ticket editor and set a value in that which can be saved via extra_meta and then called if you have the ticket object. It’s not as straight forward and just sticking an input on the page though.

The only example we have of adding additional inputs there is the within the WP User integration add-on which is what I linked to in that thread.

This is how the above add-on calls the form to add the additional input:

https://github.com/eventespresso/eea-wpuser-integration/blob/master/EED_WP_Users_Admin.module.php#L994

The _get_ticket_capability_required_form method generates the form and adds it to the page.

This method: https://github.com/eventespresso/eea-wpuser-integration/blob/master/EED_WP_Users_Admin.module.php#L1070

Confirms the form was submitted and then save/updates extra_meta with the value set.

That’s the relatively easy part done.

2. A way to display the regular price on the event page to clearly present that this is what we normally charge (I can apply the necessary styling once it can be displayed)

This is what I would consider the more difficult part, the ticket selector can’t be easily modified to output additional details (it’s currently intentional as there is a LOT of logic involved with the ticket selector so giving easy access on what it output eventually causes more harm than good).

There is a filter that allows you to modify the entire row returned:

FHEE__ticket_selector_chart_template__do_ticket_inside_row

However, if using that you’ll basically need to reproduce everything that the ticket selector class is already doing on your own and output the additional details in the price column.

Another option would be to output the additional pricing to the DOM somewhere on the single event page and use jQuery to insert those values into the ticket selector price column. That leaves the TS selector logic along and allows you to modify the details as you see fit but depends on how comfortable you are with jQuery.

The support post ‘Sale Pricing with strikethrough of regular price’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso