Support

Home Forums Event Espresso Premium Custom Calendar Table Questions

Custom Calendar Table Questions

Posted: June 22, 2014 at 10:39 am


John Groh

June 22, 2014 at 10:39 am

I bought the calendar table add on and it works, but its not linking to or showing any registration information when I click on the Register Now button. It just reloads the page when you click on that link…? How to I fix that to either go to a new page with the register form or show it on the same page?

Also, is there a way to have a short description with a read more link? Our descriptions are rather long, and have to be, and we have alot of events to be listed so the page will be a mile long if it just lists all the events with the long descriptions. Any ideas?


Lorenzo Orlando Caum

  • Support Staff

June 22, 2014 at 5:42 pm

Hello,

Do you have the [ESPRESSO_EVENTS] shortcode in use on your site? Could you also check the other WordPress pages with EE shortcodes?

You can do this through WordPress admin –> Event Espresso –> General Settings –> Pages.


Lorenzo


John Groh

June 22, 2014 at 7:35 pm

Originally i had the [ESPRESSO_EVENTS] sc on my “events” page. It worked fine but I wanted it to look like the calendar table so I put in the [EVENT_CUSTOM_VIEW template_name=”calendar-table” change_title=”Course”] instead. That brings up the look of the custom calendar but like I said in my original post, i would like some other options. Any ideas?


Lorenzo Orlando Caum

  • Support Staff

June 22, 2014 at 8:37 pm

That won’t work as expected so we’ll need to get that shortcode restored — otherwise your registrations won’t work as expected.

The [ESPRESSO_EVENTS] should not be replaced by any other shortcodes.

If you do replace it, then it needs to be added to another WordPress page and then you need to select this new page in the Event Espresso –> General Settings –> Page settings area.

http://cl.ly/image/2t182W1A0t1V

Let us know if these steps fix the broken register link.


Lorenzo


John Groh

June 23, 2014 at 10:37 am

Ok I fixed the issue of not showing the registration page using the steps you gave me. However can I do the “short description” with a read more link on the main event list page? Like I said, our descriptions are long and we have a fair amount of events to list and it will be too long to list it all on the page that lists all events.


Tony

  • Support Staff

June 24, 2014 at 4:09 am

Hi John,

You can enable the descriptions within Event Espresso -> Template Settings. ‘Display short descriptions in the event listings?’

However to display short descriptions you’ll need to insert the ‘More’ tag within the event description where you you like the text to stop. For example I’ve inserted the word ‘HERE’ to reference and than added the More tag (http://take.ms/TQPT6)

From the event list you can see the test stops at the More tag (using ‘Here’ to show that is actually where it stops) – http://take.ms/dNgnG

However this would need to be done for all of the events manually, the ‘Read More’ link is also not output as the event display already contains 2 links to the event (or 3 if using MER), the event title and the register now button.

Although [ESPRESSO_EVENTS] is a required shortcode and must be included within the page specified within Event Espresso -> General Settings -> Page Settings. Main registration page. You could hide that page from the navigation menu and use a page containing the Calendar Table to display your events if you prefer.

This would simply involve creating a new page, inserting your original EVENT_CUSTOM_VIEW shortcode and using that page for your event listing. The calendar table will basically link back to the page containing ESPRESSO_EVENTS when the user clicks the specific event they chose to register for.

Does that help?


John Groh

June 24, 2014 at 1:43 pm

That does help, thank you. One last question though…is there a way I can incorporate an “add to cart” button in this list as well? Right now there is the “register now” graphic button, but since we are using multiple event registrations, its important I can include this on the main list. Is there a way?


Tony

  • Support Staff

June 25, 2014 at 3:10 am

You’ll need to edit the template to do so but yes its possible.

If you open up espresso-template-calendar-table\index.php add this at around line 86.

if($open_spots > 1) {
	$params = array(
	//REQUIRED, the id of the event that needs to be added to the cart
	'event_id' => $event->id,
	//REQUIRED, Anchor of the link, can use text or image
	'anchor' => __("Add to Cart", 'event_espresso'),
	//'anchor' => '<img src="' . WP_PLUGIN_URL. "/".plugin_basename(dirname(__FILE__)) .'/add_to_cart.png" />',
	//REQUIRED, the event name for the event to be added to the cart
	'event_name' => $event->event_name,
	//OPTIONAL, will place this term before the link
	//'separator' => __(" or ", 'event_espresso')
	);
	$cart_link = event_espresso_cart_link($params);
} else {
	$cart_link = '';
}

Then look the line that the $live_button variable is echo’d to the page (now around line 155) you’ll find this:

<td class="td-event-register"><?php echo $live_button ?></td>

Change that to:

<td class="td-event-register"><?php echo $live_button ?><span><?php echo $cart_link ?></span></td>

Please note this is just a basic example, you’ll likely want to apply some styling to the link or create an image and use that in place of the regular ‘Add to cart’ text.

An example of how to use an image for the anchor is already included within the code:

//'anchor' => '<img src="' . WP_PLUGIN_URL. "/".plugin_basename(dirname(__FILE__)) .'/add_to_cart.png" />',

That would look within espresso-template-calendar-table directory for a file called add_to_cart.png.


John Groh

June 25, 2014 at 11:44 am

Thats great! Thank you! The only minor thing is that I created an “add to cart” button (add_to_cart.png) and put it in the same directory, but its not coming up on the page. The code you gave me looks right but its not bringing up the image.


John Groh

June 25, 2014 at 11:56 am

Ok wait, looked at it again after a few minutes away and I got the view cart image to come up. I removed the “//” commenting in the example code:

‘anchor’ => ”,


Tony

  • Support Staff

June 25, 2014 at 1:08 pm

Hi John,

Just to explain a little for future readers.

The ‘anchor’ attribute allows you to set the anchor string to use for the cart link. By default we use:

'anchor' => __("Add to Cart", 'event_espresso'),

So you’ll want to add // to the beginning of that line (or remove it) and remove the // for the example I provided within the code if you want to use an image.

The support post ‘Custom Calendar Table Questions’ 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