Support

Home Forums Event Espresso Premium Customizing the checkout page

Customizing the checkout page

Posted: July 19, 2018 at 7:01 am

Viewing 1 reply thread


Christophe Legrand

July 19, 2018 at 7:01 am

Hi,

I was reviewing the generated html on the checkout page and it is kind of a mess.

All hidden input fields are wrapped in <p> tags, there are also an awful lot of unnecessary <br> tags and so on…

Is there any way I can modify the html output generated?
I’ve looked for hooks and filters but haven’t found anything so far.

I really like to write the html output from scratch and just integrate the Event Espresso payment process.

Thanks!


Christophe Legrand

July 19, 2018 at 7:01 am

Hi,

I was reviewing the generated html on the checkout page and it is kind of a mess.

All hidden input fields are wrapped in tags, there are also an awful lot of unnecessary <br> tags and so on…

Is there any way I can modify the html output generated?
I’ve looked for hooks and filters but haven’t found anything so far.

I really like to write the html output from scratch and just integrate the Event Espresso payment process.

Thanks!


Josh

  • Support Staff

July 19, 2018 at 7:54 am

Hi Christophe,

How are you today?

Whenever there’s an awful lot of unnecessary <br> tags in the generated markup, those are actually added by a condition caused by the theme or another plugin.

For example, let’s say the template has this:

<div class="container">
<h3>Some heading text</h3>
<p>Some regular text in a paragraph. And so on</p>
<img src="site.com/imageurl.jpeg" />
<p>More text</p>
</div>

Nothing crazy there right? Here’s what can happen though, if a custom filter function is applied to the WordPress the_content() filter:

<div class="container">
<br>
<h3>Some heading text</h3>
<br>
<p><p>Some regular text in a paragraph. And so on</p></p>
<br>
<p><img src="site.com/imageurl.jpeg" /></p>
<br>
<p><p>More text</p></p>
<br>
</div>
<br>

What happened in this case was whenever there was a new line, the filter function added some extra tags. It was probably intended to be applied only to a specific shortcode on the site where it might make sense to add the tags, but other shortcodes end up getting the same treatment.

So you could try to find the theme function or plugin that’s adding the extra stuff or you’ll run into the same issue with your custom templates.

If you must alter the markup, you can do your own templates as replacements. Depending on how the template is loaded you’ll use one of two methods:

1) If the template is loaded with locate_template() you can put a copy of the template into the active WordPress child theme and your template will load instead.

2) If the template is loaded with display_template() you’ll use the
FHEE__EEH_Template__display_template__template_path filter hook to change the path to point to the location of your own template.

Please be aware that there is JavaScript that interacts with the markup so if you remove/add change class names and IDs that could break those parts of the functionality.

Viewing 1 reply thread

The support post ‘Customizing the checkout page’ 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