Posted: April 10, 2019 at 4:51 am
|
I am looking at the sample custom ticket selector template found here as an example of how I can change the output of the inside of each row for my ticket selector, but this is excessively complicated for my needs, and I am getting confused about which aspects are actually needed to add an event to the MER cart. Can you tell me how I could display a simplified version of the ticket selector for my multi-event listing page that just shows a drop down to select the number of tickets, and an Add button? Each of our events only offers one kind of ticket for one datetime, so we can safely just select the first ticket for each event. I have gotten pretty close using CSS to hide some parts of the default ticket selector, but I still can’t get it to display as I want it to, because the form elements are creating extra space, and the Add button is showing below the drop-down instead of next to it. Also, for the events that are sold out, the Sign Up for the Waitlist button has huge spaces around it (also because of the form and hidden elements, I think), and I don’t know how to change the text on that button, either. Also, if I make a custom template for my ticket selector, is that the same selector that gets used in the shopping cart? Is there a way to specific different templates of the ticket selector for use on different pages? |
Hi there, There’s a lot of logic within the ticket selector and if you get any of it wrong it will break the ticket selector in various different situations so I’d advise against customizing the output using your own template. The template you’ve linked to is over 3 years old and may not work with the latest changes within EE (which is another reason I’d advise against your own template, you’ll need to monitor any changes to core and apply them to your templates). I’d recommend taking a look at the method used to process the ticket selector submit within Work through the You can then either customize the templates to suit, keeping the required data (I don’t recommend this), or create your own form to submit the required data and structure that however you prefer. Then just override the
As far as I’m aware, there is no ticket selector on the shopping cart? If you mean the Qty fields for each ticket then no, it does not use the ticket selector and would need to be changed separately. |
|
|
Thanks, I will go take a look at that code. However, one super helpful change to the core code would be to make the ticket selector output it’s display using div tags that are easier to format with CSS, instead of tables. Because I am stuck with tables, I can’t customize the output without essentially modifying or overriding core code, which I am trying to get away from (we already had to do that in EE3 and I really don’t want to have to do that as we transition to EE4!). Could you put that on a feature request list, please? Alternately, do you know of any way in CSS to remove the table, tr and td tags but leave the content? |
May I ask why changing the output to div’s would make this easier to style? We would have to apply similar styles to divs to output the ticket selector the way we do currently, so if you wanted to then style those, you’d need to remove all of the styles applied to those divs anyway, which you can do with tables. For example: Sets tables to display as blocks (like Divs) and td’s inline (like spans).
Remove the tags themselves with CSS? No. You can style them, but not remove them. |
|
The support post ‘simplified ticket selector template’ 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.