Support

Home Forums Event Espresso Premium Link from calendar to a specific ticket via the "register now"

Link from calendar to a specific ticket via the "register now"

Posted: August 9, 2018 at 12:49 pm

Viewing 6 reply threads


shion

August 9, 2018 at 12:49 pm

Hello! Was wondering if it’s possible to directly link from the calendar to a specific date/ticket combination (or at least have the chosen date from the calendar preselected on the 2nd page).

For example:
http://calgaryfirstaidtraining.ca/first-aid-training/online-first-aid-course/

Clicking any of the register now buttons just leads to a list and the user has to re-select the appropriate date.

Thank you!


Josh

  • Support Staff

August 9, 2018 at 4:40 pm

Hi,

We generally recommend creating a separate event for each class to help eliminate the confusion about which ticket/date combination to pick within one event.

That said, an alternative idea would to add a URL parameter to the calendar links so when they click a specific date time on the calendar, the selected date time will be highlighted within the ticket selector. Those cannot be automatically selected, but the highlighting will help.

There’s some example code in this gist that shows how to add this:

https://gist.github.com/joshfeck/5ea4bf3e1b683fac4e21671da783a1a3

You can add the above to a functions plugin or into your WordPress child theme’s functions.php file.

You can check out a demonstration here:
http://dev-moonseed.pantheonsite.io/calendar/


shion

August 9, 2018 at 7:00 pm

Thank you for the reply! I originally went with the combined route since these courses are identical (just on different dates). It seemed easier/faster (and a bit cleaner, URL wise) to just add additional dates than re-creating the template/layout and configuring the ticketing for each date separately.
(Unless EE4 has a way of saving a particular set of settings that can be easily applied to subsequent posts) For example, when creating a new event, there is always a “free ticket” entry that needs to be removed. However, i’ve recently bought the plugin so I’m still going through the documentation.

Also, I used another plugin (which used separate posts for each date). However, our SEO was being hurt from “duplicate title tags”

Going back to the issue, i applied the code in the theme’s function.php file. I see the URL being added on but the color is not changing.

Finally, the css for the table headers appears to be weird under the following in Chrome and macOS Safari 11.1 but not in firefox: (the height of the header is excessively tall)
Access
– This option allows access to the following dates and times.

Is there any way to have the plugin’s CSS override the theme’s css? (Changing the theme to default 2017 solves the issue) I’ve looked through the forums but they seem to refer to an older version and appear to be depreciated.

Thank you!


Josh

  • Support Staff

August 10, 2018 at 9:50 am

Hi,

I’ll follow up with each of your questions below:

(Unless EE4 has a way of saving a particular set of settings that can be easily applied to subsequent posts) For example, when creating a new event, there is always a “free ticket” entry that needs to be removed. However, i’ve recently bought the plugin so I’m still going through the documentation.

It does have a way of saving a particular set of settings! For example, with the default ticket, you can go to Event Espresso → Pricing and edit the Base Price type ticket. There you can edit the name & amount, and that will be used for the default ticket the next time you create an event.

Also, I used another plugin (which used separate posts for each date). However, our SEO was being hurt from “duplicate title tags”

We do have some code snippets that will help you avoid some of the SEO-related gotchas.

This one adds a “noindex” meta tag to expired events:
https://gist.github.com/joshfeck/70979dc12f93ab25dd668ed4500be477

I see that your site has the Yoast SEO plugin. You can add this snippet and it will exclude expired events from the generated XML sitemaps:
https://gist.github.com/joshfeck/85dcc9947b8f406093498464f542e990

Also, you can extend the Yoast SEO plugin so it allows for editing events. You’ll add this snippet so the Yoast plugin can find its way into the event editor:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/third-party-integration/tw_ee_load_yoast_seo_within_ee.php

Then, you can edit the event’s meta title tag so it’s unique.
For example your current title tag is:
“Online First Aid Course – Calgary First Aid Training”
you could change the title tag to be something like:
“Online First Aid Courses in Q3 2018 – Calgary First Aid Training”
then the title would be unique and more descriptive.

Going back to the issue, i applied the code in the theme’s function.php file. I see the URL being added on but the color is not changing.

One last step I failed to mention: You’ll go to Event Espresso → Events → Templates and set “Show Date & Time Filter?” to Maybe.

Finally, the css for the table headers appears to be weird under the following in Chrome and macOS Safari 11.1 but not in firefox: (the height of the header is excessively tall)
Access
– This option allows access to the following dates and times.
Is there any way to have the plugin’s CSS override the theme’s css? (Changing the theme to default 2017 solves the issue)

Generally speaking, CSS with more specificity overrides CSS with less specificity. Event Espresso’s CSS doesn’t try to completely take over the design of your site (usually it’s desired to let the theme work out the design of the site)

In the case of your particular theme, it’s kind of doing an overreach with the last rule in this set:

html, body, #jckqv {
    font-size: 12px;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    line-height: 1.5em;
    color: #666666;
    word-break: break-word;
}

word-break really shouldn’t be applied to all html on the page, and we’re seeing an example of what can go wrong where table cells/heading go out of proportion (and Firefox seems to wisely override it)

To fix the huge table headings/cells, you can add this to your custom stylesheet:

th, td {
word-break: normal !important;
}


shion

August 11, 2018 at 7:04 am

Thank you for your help! The code regarding word-break worked! I figured something from the theme was causing issues hence the idea of an override.

I will look into the method of integrating Yoast and decide from there which route would be best. Thank you again!


shion

August 17, 2018 at 7:14 am

Hello again. I had a chance to tackle this issue.
While the default ticket does allow editing, both of them (free admission + the new default ticket) show up when creating a new event and the “irrelevant ones” has to be deleted. Is this by design?

Also, the free admission/built in default has a padlock (in the default tickets tab) and seems locked at 100 qty – can this be changed?

Thank you again!


Josh

  • Support Staff

August 17, 2018 at 1:15 pm

It sounds like somewhere along the way you’ve added a second default ticket. You can remove the second default ticket by going to Event Espresso > Events > Default Tickets. Then click the link to trash the other default ticket.

You can change the default ticket’s qty setting by adding a tiny bit of PHP code to a site functions plugins. Here’s an example code snippet that changes the default to 45:

https://gist.github.com/joshfeck/8daf730289d1dd3ceb6c52fc5e47dd82

You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file.

Viewing 6 reply threads

The support post ‘Link from calendar to a specific ticket via the "register now"’ 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