Support

Home Forums Event Espresso Premium Add line to Ticket Selector

Add line to Ticket Selector

Posted: November 23, 2015 at 3:24 am

Viewing 8 reply threads


Auric

November 23, 2015 at 3:24 am

I need to add an extra live to the ticket selector displayed on each event page that simply says ‘Don’t want to book online? Please call us.’ How/where do I do that?


Auric

November 23, 2015 at 4:04 am

Also, can I force a default value to the drop down fields on the booking form?


Tony

  • Support Staff

November 23, 2015 at 6:56 am

Hi there,

We have an example of how to set the default qty dropdown to 1 here:

https://eventespresso.com/wiki/setup-default-value-1-ticket-selector/

Although you can also set the ticket to be required within the editor, this will default to 1 an force that ticket to be selector for registrations.

Currently you can not add an additional row to the ticket selector, although there is a hook you can use to display text just after the ticket selector – http://take.ms/BaLgm

You could output a div any other html you prefer there, will that work?


Tony

  • Support Staff

November 23, 2015 at 7:00 am

The function used to make that example can be found here:

https://gist.github.com/Pebblo/04f2cce775c534d0b440


Auric

November 23, 2015 at 7:03 am

Actually the needing a default value is for a drop down lists that contain state/province/country in the registration form.

I managed to add a line to the ticket selector using ::before. See http://corp.capechamber.auric-consulting.com/events/online-marketing-twitter-workshop/. Maybe using a hook would be a better idea though? What’s the best approach?


Auric

November 23, 2015 at 7:05 am

Sorry, I know my request was confusing. In the ticket registration form I need to default the province to ‘Western Cape’ and the country to ‘South Africa.’


Tony

  • Support Staff

November 23, 2015 at 7:23 am

Maybe using a hook would be a better idea though? What’s the best approach?

The main different is that you can’t select the text when using ::before, you can place text in that exact same location using the hook ‘AHEE__ticket_selector_chart__template__before_ticket_selector’, for example:

https://gist.github.com/Pebblo/81f1dfe1fa62dde43fc0

You’ll obviously want your own text and likely within a P tag but it should look very similar to your current output. I would recommend creating a Site Specific Plugin to put in functions like these.

Sorry, I know my request was confusing. In the ticket registration form I need to default the province to ‘Western Cape’ and the country to ‘South Africa.’

Currently EE does not provide an option to set the default for those field, you could do something similar to the jQuery methods mentioned in the above link for those field, but it would need some custom development.


Auric

November 23, 2015 at 7:41 am

The code on github.com. The function name on add_action line need tw_ adding to the front; tw_output_details_after_ts. Once I’d figured that out it works fine.
I’m not a developer so jQuery is beyond me.
Thanks Tony, these issues are resolved.


Tony

  • Support Staff

November 23, 2015 at 11:00 am

Thanks for letting me know, I actually fixed that a couple of minutes after adding the gist but I guess you already had it open 🙂

I’m glad it helped.

Viewing 8 reply threads

The support post ‘Add line to Ticket Selector’ 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