Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Remove View Event link - just add to cart link | Event Espresso - Staging Server

Support

Home Forums Multiple Event Registration Remove View Event link – just add to cart link

Remove View Event link – just add to cart link

Posted: April 9, 2014 at 7:38 am

Viewing 11 reply threads


Charlie Farrow

April 9, 2014 at 7:38 am

I too want to do this http://staging.eventespresso.com/topic/removing-register-linkview-details-just-add-to-cart-link/ and as advised I have copied both event_list_display.php and event_list.php into wp-content/uploads/espresso/templates. But I am totally unclear what I replace in event_list_display with what?

Thanks in advance for your help.

I called my Event List page Registration:
[URL=http://s185.photobucket.com/user/CharlieFarrow/media/RemoveViewDetails_zpsf8db65b6.jpg.html][IMG]http://i185.photobucket.com/albums/x162/CharlieFarrow/RemoveViewDetails_zpsf8db65b6.jpg[/IMG][/URL]


Anonymous

April 9, 2014 at 8:40 am

Hi Charlie,

Open up wp-content/uploads/espresso/template/event_list_display.php

On lines 149-152 you’ll find:

<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
	<a class="a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all" id="a_register_link-<?php echo $event_id ?>" href="<?php echo $registration_url; ?>" title="<?php echo stripslashes_deep($event_name) ?>"><?php _e('Register', 'event_espresso'); ?></a>
	<?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
</p>

Removing line 150 leaves:

<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
	<?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
</p>

Which removes the Register Now/View Details button, although ‘or’ that is currently between those buttons will remain.

To remove that got to line 135, you should find:

'separator' => __(" or ", 'event_espresso')

Comment that out as follows:

//'separator' => __(" or ", 'event_espresso')

Save the template and reload the page.

Be sure to make a backup of the files before modifying them.


Charlie Farrow

April 9, 2014 at 9:12 am

Thanks Tony. I did that to the version in wp-content/uploads/espresso/templates but nothing has changed. Should I have changed the original one?


Anonymous

April 9, 2014 at 9:17 am

No you should edit templates within wp-content/uploads/espresso/templates/

Can you go to you sites Dashboard, then Event Espresso -> Template Settings.

On the bottom of the page you’ll find a ‘Developers Only’ section, are your event_list.php & event_list_display.php template files shown as ‘moved’?


Charlie Farrow

April 9, 2014 at 9:30 am

Yes. What I did was ftp the modified event_list_display and the unmodified event_list to wp-content/uploads/espresso/templates.


Charlie Farrow

April 9, 2014 at 9:33 am

<code>&lt;?php
//This is the event list template page.
//This is a template file for displaying an event lsit on a page.
//There should be a copy of this file in your wp-content/uploads/espresso/ folder.
/*
 * use the following shortcodes in a page or post:
 * [EVENT_LIST]
 * [EVENT_LIST limit=1]
 * [EVENT_LIST css_class=my-custom-class]
 * [EVENT_LIST show_expired=true]
 * [EVENT_LIST show_deleted=true]
 * [EVENT_LIST show_secondary=false]
 * [EVENT_LIST show_recurrence=true]
 * [EVENT_LIST category_identifier=your_category_identifier]
 *
 * Example:
 * [EVENT_LIST limit=5 show_recurrence=true category_identifier=your_category_identifier]
 *
 */

//Print out the array of event status options
//print_r (event_espresso_get_is_active($event_id));
//Here we can create messages based on the event status. These variables can be echoed anywhere on the page to display your status message.
$status = event_espresso_get_is_active(0,$event_meta);
$status_display = &#039; - &#039; . $status[&#039;display_custom&#039;];
$status_display_ongoing = $status[&#039;status&#039;] == &#039;ONGOING&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_deleted = $status[&#039;status&#039;] == &#039;DELETED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_secondary = $status[&#039;status&#039;] == &#039;SECONDARY&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;; //Waitlist event
$status_display_draft = $status[&#039;status&#039;] == &#039;DRAFT&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_pending = $status[&#039;status&#039;] == &#039;PENDING&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_denied = $status[&#039;status&#039;] == &#039;DENIED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_expired = $status[&#039;status&#039;] == &#039;EXPIRED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_reg_closed = $status[&#039;status&#039;] == &#039;REGISTRATION_CLOSED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_not_open = $status[&#039;status&#039;] == &#039;REGISTRATION_NOT_OPEN&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_open = $status[&#039;status&#039;] == &#039;REGISTRATION_OPEN&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;

//You can also display a custom message. For example, this is a custom registration not open message:
$status_display_custom_closed = $status[&#039;status&#039;] == &#039;REGISTRATION_CLOSED&#039; ? &#039; - &lt;span class=&quot;espresso_closed&quot;&gt;&#039; . __(&#039;Regsitration is closed&#039;, &#039;event_espresso&#039;) . &#039;&lt;/span&gt;&#039; : &#039;&#039;;
global $this_event_id;
$this_event_id = $event_id;
?&gt;
&lt;div id=&quot;event_data-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_data &lt;?php echo $css_class; ?&gt; &lt;?php echo $category_identifier; ?&gt; event-data-display event-list-display event-display-boxes ui-widget&quot;&gt;
	&lt;h3 id=&quot;event_title-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_title ui-widget-header ui-corner-top&quot;&gt;&lt;a title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot; class=&quot;a_event_title&quot; id=&quot;a_event_title-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot;&gt;&lt;?php echo stripslashes_deep($event_name) ?&gt;&lt;/a&gt;
		&lt;?php /* These are custom messages that can be displayed based on the event status. Just un-comment the one you want to use. */ ?&gt;
		&lt;?php //echo $status_display; //Turn this on to display the overall status of the event.  ?&gt;
		&lt;?php //echo $status_display_ongoing; //Turn this on to display the ongoing message. ?&gt;
		&lt;?php //echo $status_display_deleted; //Turn this on to display the deleted message. ?&gt;
		&lt;?php //echo $status_display_secondary; //Turn this on to display the waitlist message. ?&gt;
		&lt;?php //echo $status_display_reg_closed; //Turn this on to display the registration closed message. ?&gt;
		&lt;?php //echo $status_display_not_open; //Turn this on to display the secondary message. ?&gt;
		&lt;?php //echo $status_display_open; //Turn this on to display the not open message. ?&gt;
		&lt;?php //echo $status_display_custom_closed; //Turn this on to display the closed message. ?&gt;
	&lt;/h3&gt;
&lt;div class=&quot;event-data-display ui-widget-content ui-corner-bottom&quot;&gt;
	&lt;?php /* Venue details. Un-comment to display. */ ?&gt;
	&lt;?php //echo $venue_title != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_name-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_name&quot;&gt;&#039;.stripslashes_deep($venue_title).&#039;&lt;/p&gt;&#039;:&#039;&#039; ?&gt;
	&lt;?php //echo $venue_address != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_address-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_address&quot;&gt;&#039;.stripslashes_deep($venue_address).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_address2 != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_address2-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_address2&quot;&gt;&#039;.stripslashes_deep($venue_address2).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_city != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_city-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_city&quot;&gt;&#039;.stripslashes_deep($venue_city).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_state != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_state-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_state&quot;&gt;&#039;.stripslashes_deep($venue_state).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_zip != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_zip-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_zip&quot;&gt;&#039;.stripslashes_deep($venue_zip).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_country != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_country-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_country&quot;&gt;&#039;.stripslashes_deep($venue_country).&#039;&lt;/p&gt;&#039;:&#039;&#039;
	$event-&gt;event_cost = empty($event-&gt;event_cost) ? &#039;&#039; : $event-&gt;event_cost;
	 //Featured image
	echo apply_filters(&#039;filter_hook_espresso_display_featured_image&#039;, $event_id, !empty($event_meta[&#039;event_thumbnail_url&#039;]) ? $event_meta[&#039;event_thumbnail_url&#039;] : &#039;&#039;);
	//Show short descriptions
	if (!empty($event_desc) &amp;&amp; isset($org_options[&#039;display_short_description_in_event_list&#039;]) &amp;&amp; $org_options[&#039;display_short_description_in_event_list&#039;] == &#039;Y&#039;) {
		?&gt;
		&lt;div class=&quot;event-desc&quot;&gt;
		
			&lt;?php echo espresso_format_content($event_desc); ?&gt;
		&lt;/div&gt;
		&lt;?php
	}
	?&gt;
	&lt;div class=&quot;event-meta&quot;&gt;
			&lt;?php 
				if ( $event-&gt;event_cost != &#039;0.00&#039; ) {
			?&gt;
					&lt;p id=&quot;p_event_price-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_price&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php  echo __(&#039;Price: &#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;?php echo  $org_options[&#039;currency_symbol&#039;].$event-&gt;event_cost; ?&gt;&lt;/p&gt;
			&lt;?php } else { ?&gt; 
					&lt;p id=&quot;p_event_price-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_price&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php  echo __(&#039;Price: &#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;?php echo __(&#039;Free Event&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/p&gt;
			&lt;?php } ?&gt;

		&lt;p id=&quot;event_date-&lt;?php echo $event_id ?&gt;&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Date:&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt;  &lt;?php echo event_date_display($start_date, get_option(&#039;date_format&#039;)) ?&gt; 
			&lt;?php //Add to calendar button
			echo apply_filters(&#039;filter_hook_espresso_display_ical&#039;, $all_meta);?&gt;
		&lt;/p&gt;
	&lt;/div&gt;

	&lt;?php if ( (isset($location) &amp;&amp; $location != &#039;&#039; ) &amp;&amp; (isset($org_options[&#039;display_address_in_event_list&#039;]) &amp;&amp; $org_options[&#039;display_address_in_event_list&#039;] == &#039;Y&#039;) ) { ?&gt;
		&lt;p class=&quot;event_address&quot; id=&quot;event_address-&lt;?php echo $event_id ?&gt;&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php echo __(&#039;Address:&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;br /&gt;
			
			&lt;span class=&quot;address-block&quot;&gt;
			&lt;?php echo stripslashes_deep($venue_title); ?&gt;&lt;br /&gt;
			&lt;?php echo stripslashes_deep($location); ?&gt;
				&lt;span class=&quot;google-map-link&quot;&gt;&lt;?php echo $google_map_link; ?&gt;&lt;/span&gt;&lt;/span&gt;
		&lt;/p&gt;
		&lt;?php
	}

	$num_attendees = get_number_of_attendees_reg_limit($event_id, &#039;num_attendees&#039;); //Get the number of attendees. Please visit http://staging.eventespresso.com/forums/?p=247 for available parameters for the get_number_of_attendees_reg_limit() function.
	if ($num_attendees &gt;= $reg_limit) {
		?&gt;
		&lt;p id=&quot;available_spaces-&lt;?php echo $event_id ?&gt;&quot; class=&quot;available-spaces&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Available Spaces:&#039;, &#039;event_espresso&#039;) ?&gt; &lt;/span&gt;&lt;?php echo get_number_of_attendees_reg_limit($event_id, &#039;available_spaces&#039;, &#039;All Seats Reserved&#039;) ?&gt;&lt;/p&gt;
		&lt;?php if ($overflow_event_id != &#039;0&#039; &amp;&amp; $allow_overflow == &#039;Y&#039;) { ?&gt;
			&lt;p id=&quot;register_link-&lt;?php echo $overflow_event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $overflow_event_id ?&gt;&quot; href=&quot;&lt;?php echo espresso_reg_url($overflow_event_id); ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;Join Waiting List&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt;&lt;/p&gt;
			&lt;?php
		}
	} else {
		if ($display_reg_form == &#039;Y&#039; &amp;&amp; $externalURL == &#039;&#039;) {
			?&gt;&lt;p id=&quot;available_spaces-&lt;?php echo $event_id ?&gt;&quot; class=&quot;spaces-available&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Available Spaces:&#039;, &#039;event_espresso&#039;) ?&gt;&lt;/span&gt; &lt;?php echo get_number_of_attendees_reg_limit($event_id, &#039;available_spaces&#039;) ?&gt;&lt;/p&gt;
			&lt;?php
		}

		/**
		 * Load the multi event link.
		 * */
		//Un-comment these next lines to check if the event is active
		//echo event_espresso_get_status($event_id);
		//print_r( event_espresso_get_is_active($event_id));

		if ($multi_reg &amp;&amp; event_espresso_get_status($event_id) == &#039;ACTIVE&#039;/* &amp;&amp; $display_reg_form == &#039;Y&#039;*/) { 
		// Uncomment &amp;&amp; $display_reg_form == &#039;Y&#039; in the line above to hide the add to cart link/button form the event list when the registration form is turned off.

			$params = array(
				//REQUIRED, the id of the event that needs to be added to the cart
				&#039;event_id&#039; =&gt; $event_id,
				//REQUIRED, Anchor of the link, can use text or image
				&#039;anchor&#039; =&gt; __(&quot;Add to Cart&quot;, &#039;event_espresso&#039;), //&#039;anchor&#039; =&gt; &#039;&lt;img src=&quot;&#039; . EVENT_ESPRESSO_PLUGINFULLURL . &#039;images/cart_add.png&quot; /&gt;&#039;,
				//REQUIRED, if not available at this point, use the next line before this array declaration
				// $event_name = get_event_field(&#039;event_name&#039;, EVENTS_DETAIL_TABLE, &#039; WHERE id = &#039; . $event_id);
				&#039;event_name&#039; =&gt; $event_name,
				//OPTIONAL, will place this term before the link
				&#039;separator&#039; =&gt; __(&quot; or &quot;, &#039;event_espresso&#039;)
			);

			$cart_link = event_espresso_cart_link($params);
		}else{
			$cart_link = false;
		}
		if ($display_reg_form == &#039;Y&#039;) {
			//Check to see if the Members plugin is installed.
			$member_options = get_option(&#039;events_member_settings&#039;);
			if ( function_exists(&#039;espresso_members_installed&#039;) &amp;&amp; espresso_members_installed() == true &amp;&amp; !is_user_logged_in() &amp;&amp; ($member_only == &#039;Y&#039; || $member_options[&#039;member_only_all&#039;] == &#039;Y&#039;) ) {
				echo &#039;&lt;p class=&quot;ee_member_only&quot;&gt;&#039;.__(&#039;Member Only Event&#039;, &#039;event_espresso&#039;).&#039;&lt;/p&gt;&#039;;
			}else{
			?&gt;
				&lt;p id=&quot;register_link-&lt;?php echo $event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;
					&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;Register&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt;
					&lt;?php echo isset($cart_link) &amp;&amp; $externalURL == &#039;&#039; ? $cart_link : &#039;&#039;; ?&gt;
				&lt;/p&gt;
	&lt;?php 
			}
		} else { 
	?&gt;
			&lt;p id=&quot;register_link-&lt;?php echo $event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;
				&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;View Details&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt; &lt;?php echo isset($cart_link) &amp;&amp; $externalURL == &#039;&#039; ? $cart_link : &#039;&#039;; ?&gt;
			&lt;/p&gt;
			
		&lt;?php
		}
	}
	?&gt;
	
&lt;/div&gt;&lt;!-- / .event-data-display --&gt;
&lt;/div&gt;&lt;!-- / .event-display-boxes --&gt;
</code>


Charlie Farrow

April 9, 2014 at 9:38 am

Replaced with:

<code>&lt;?php
//This is the event list template page.
//This is a template file for displaying an event lsit on a page.
//There should be a copy of this file in your wp-content/uploads/espresso/ folder.
/*
 * use the following shortcodes in a page or post:
 * [EVENT_LIST]
 * [EVENT_LIST limit=1]
 * [EVENT_LIST css_class=my-custom-class]
 * [EVENT_LIST show_expired=true]
 * [EVENT_LIST show_deleted=true]
 * [EVENT_LIST show_secondary=false]
 * [EVENT_LIST show_recurrence=true]
 * [EVENT_LIST category_identifier=your_category_identifier]
 *
 * Example:
 * [EVENT_LIST limit=5 show_recurrence=true category_identifier=your_category_identifier]
 *
 */

//Print out the array of event status options
//print_r (event_espresso_get_is_active($event_id));
//Here we can create messages based on the event status. These variables can be echoed anywhere on the page to display your status message.
$status = event_espresso_get_is_active(0,$event_meta);
$status_display = &#039; - &#039; . $status[&#039;display_custom&#039;];
$status_display_ongoing = $status[&#039;status&#039;] == &#039;ONGOING&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_deleted = $status[&#039;status&#039;] == &#039;DELETED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_secondary = $status[&#039;status&#039;] == &#039;SECONDARY&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;; //Waitlist event
$status_display_draft = $status[&#039;status&#039;] == &#039;DRAFT&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_pending = $status[&#039;status&#039;] == &#039;PENDING&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_denied = $status[&#039;status&#039;] == &#039;DENIED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_expired = $status[&#039;status&#039;] == &#039;EXPIRED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_reg_closed = $status[&#039;status&#039;] == &#039;REGISTRATION_CLOSED&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_not_open = $status[&#039;status&#039;] == &#039;REGISTRATION_NOT_OPEN&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;
$status_display_open = $status[&#039;status&#039;] == &#039;REGISTRATION_OPEN&#039; ? &#039; - &#039; . $status[&#039;display_custom&#039;] : &#039;&#039;;

//You can also display a custom message. For example, this is a custom registration not open message:
$status_display_custom_closed = $status[&#039;status&#039;] == &#039;REGISTRATION_CLOSED&#039; ? &#039; - &lt;span class=&quot;espresso_closed&quot;&gt;&#039; . __(&#039;Regsitration is closed&#039;, &#039;event_espresso&#039;) . &#039;&lt;/span&gt;&#039; : &#039;&#039;;
global $this_event_id;
$this_event_id = $event_id;
?&gt;
&lt;div id=&quot;event_data-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_data &lt;?php echo $css_class; ?&gt; &lt;?php echo $category_identifier; ?&gt; event-data-display event-list-display event-display-boxes ui-widget&quot;&gt;
	&lt;h3 id=&quot;event_title-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_title ui-widget-header ui-corner-top&quot;&gt;&lt;a title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot; class=&quot;a_event_title&quot; id=&quot;a_event_title-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot;&gt;&lt;?php echo stripslashes_deep($event_name) ?&gt;&lt;/a&gt;
		&lt;?php /* These are custom messages that can be displayed based on the event status. Just un-comment the one you want to use. */ ?&gt;
		&lt;?php //echo $status_display; //Turn this on to display the overall status of the event.  ?&gt;
		&lt;?php //echo $status_display_ongoing; //Turn this on to display the ongoing message. ?&gt;
		&lt;?php //echo $status_display_deleted; //Turn this on to display the deleted message. ?&gt;
		&lt;?php //echo $status_display_secondary; //Turn this on to display the waitlist message. ?&gt;
		&lt;?php //echo $status_display_reg_closed; //Turn this on to display the registration closed message. ?&gt;
		&lt;?php //echo $status_display_not_open; //Turn this on to display the secondary message. ?&gt;
		&lt;?php //echo $status_display_open; //Turn this on to display the not open message. ?&gt;
		&lt;?php //echo $status_display_custom_closed; //Turn this on to display the closed message. ?&gt;
	&lt;/h3&gt;
&lt;div class=&quot;event-data-display ui-widget-content ui-corner-bottom&quot;&gt;
	&lt;?php /* Venue details. Un-comment to display. */ ?&gt;
	&lt;?php //echo $venue_title != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_name-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_name&quot;&gt;&#039;.stripslashes_deep($venue_title).&#039;&lt;/p&gt;&#039;:&#039;&#039; ?&gt;
	&lt;?php //echo $venue_address != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_address-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_address&quot;&gt;&#039;.stripslashes_deep($venue_address).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_address2 != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_address2-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_address2&quot;&gt;&#039;.stripslashes_deep($venue_address2).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_city != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_city-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_city&quot;&gt;&#039;.stripslashes_deep($venue_city).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_state != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_state-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_state&quot;&gt;&#039;.stripslashes_deep($venue_state).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_zip != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_zip-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_zip&quot;&gt;&#039;.stripslashes_deep($venue_zip).&#039;&lt;/p&gt;&#039;:&#039;&#039;?&gt;
	&lt;?php //echo $venue_country != &#039;&#039;?&#039;&lt;p id=&quot;event_venue_country-&#039;.$event_id.&#039;&quot; class=&quot;event_venue_country&quot;&gt;&#039;.stripslashes_deep($venue_country).&#039;&lt;/p&gt;&#039;:&#039;&#039;
	$event-&gt;event_cost = empty($event-&gt;event_cost) ? &#039;&#039; : $event-&gt;event_cost;
	 //Featured image
	echo apply_filters(&#039;filter_hook_espresso_display_featured_image&#039;, $event_id, !empty($event_meta[&#039;event_thumbnail_url&#039;]) ? $event_meta[&#039;event_thumbnail_url&#039;] : &#039;&#039;);
	//Show short descriptions
	if (!empty($event_desc) &amp;&amp; isset($org_options[&#039;display_short_description_in_event_list&#039;]) &amp;&amp; $org_options[&#039;display_short_description_in_event_list&#039;] == &#039;Y&#039;) {
		?&gt;
		&lt;div class=&quot;event-desc&quot;&gt;
		
			&lt;?php echo espresso_format_content($event_desc); ?&gt;
		&lt;/div&gt;
		&lt;?php
	}
	?&gt;
	&lt;div class=&quot;event-meta&quot;&gt;
			&lt;?php 
				if ( $event-&gt;event_cost != &#039;0.00&#039; ) {
			?&gt;
					&lt;p id=&quot;p_event_price-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_price&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php  echo __(&#039;Price: &#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;?php echo  $org_options[&#039;currency_symbol&#039;].$event-&gt;event_cost; ?&gt;&lt;/p&gt;
			&lt;?php } else { ?&gt; 
					&lt;p id=&quot;p_event_price-&lt;?php echo $event_id ?&gt;&quot; class=&quot;event_price&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php  echo __(&#039;Price: &#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;?php echo __(&#039;Free Event&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/p&gt;
			&lt;?php } ?&gt;

		&lt;p id=&quot;event_date-&lt;?php echo $event_id ?&gt;&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Date:&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt;  &lt;?php echo event_date_display($start_date, get_option(&#039;date_format&#039;)) ?&gt; 
			&lt;?php //Add to calendar button
			echo apply_filters(&#039;filter_hook_espresso_display_ical&#039;, $all_meta);?&gt;
		&lt;/p&gt;
	&lt;/div&gt;

	&lt;?php if ( (isset($location) &amp;&amp; $location != &#039;&#039; ) &amp;&amp; (isset($org_options[&#039;display_address_in_event_list&#039;]) &amp;&amp; $org_options[&#039;display_address_in_event_list&#039;] == &#039;Y&#039;) ) { ?&gt;
		&lt;p class=&quot;event_address&quot; id=&quot;event_address-&lt;?php echo $event_id ?&gt;&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php echo __(&#039;Address:&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/span&gt; &lt;br /&gt;
			
			&lt;span class=&quot;address-block&quot;&gt;
			&lt;?php echo stripslashes_deep($venue_title); ?&gt;&lt;br /&gt;
			&lt;?php echo stripslashes_deep($location); ?&gt;
				&lt;span class=&quot;google-map-link&quot;&gt;&lt;?php echo $google_map_link; ?&gt;&lt;/span&gt;&lt;/span&gt;
		&lt;/p&gt;
		&lt;?php
	}

	$num_attendees = get_number_of_attendees_reg_limit($event_id, &#039;num_attendees&#039;); //Get the number of attendees. Please visit http://staging.eventespresso.com/forums/?p=247 for available parameters for the get_number_of_attendees_reg_limit() function.
	if ($num_attendees &gt;= $reg_limit) {
		?&gt;
		&lt;p id=&quot;available_spaces-&lt;?php echo $event_id ?&gt;&quot; class=&quot;available-spaces&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Available Spaces:&#039;, &#039;event_espresso&#039;) ?&gt; &lt;/span&gt;&lt;?php echo get_number_of_attendees_reg_limit($event_id, &#039;available_spaces&#039;, &#039;All Seats Reserved&#039;) ?&gt;&lt;/p&gt;
		&lt;?php if ($overflow_event_id != &#039;0&#039; &amp;&amp; $allow_overflow == &#039;Y&#039;) { ?&gt;
			&lt;p id=&quot;register_link-&lt;?php echo $overflow_event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $overflow_event_id ?&gt;&quot; href=&quot;&lt;?php echo espresso_reg_url($overflow_event_id); ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;Join Waiting List&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt;&lt;/p&gt;
			&lt;?php
		}
	} else {
		if ($display_reg_form == &#039;Y&#039; &amp;&amp; $externalURL == &#039;&#039;) {
			?&gt;&lt;p id=&quot;available_spaces-&lt;?php echo $event_id ?&gt;&quot; class=&quot;spaces-available&quot;&gt;&lt;span class=&quot;section-title&quot;&gt;&lt;?php _e(&#039;Available Spaces:&#039;, &#039;event_espresso&#039;) ?&gt;&lt;/span&gt; &lt;?php echo get_number_of_attendees_reg_limit($event_id, &#039;available_spaces&#039;) ?&gt;&lt;/p&gt;
			&lt;?php
		}

		/**
		 * Load the multi event link.
		 * */
		//Un-comment these next lines to check if the event is active
		//echo event_espresso_get_status($event_id);
		//print_r( event_espresso_get_is_active($event_id));

		if ($multi_reg &amp;&amp; event_espresso_get_status($event_id) == &#039;ACTIVE&#039;/* &amp;&amp; $display_reg_form == &#039;Y&#039;*/) { 
		// Uncomment &amp;&amp; $display_reg_form == &#039;Y&#039; in the line above to hide the add to cart link/button form the event list when the registration form is turned off.

			$params = array(
				//REQUIRED, the id of the event that needs to be added to the cart
				&#039;event_id&#039; =&gt; $event_id,
				//REQUIRED, Anchor of the link, can use text or image
				&#039;anchor&#039; =&gt; __(&quot;Add to Cart&quot;, &#039;event_espresso&#039;), //&#039;anchor&#039; =&gt; &#039;&lt;img src=&quot;&#039; . EVENT_ESPRESSO_PLUGINFULLURL . &#039;images/cart_add.png&quot; /&gt;&#039;,
				//REQUIRED, if not available at this point, use the next line before this array declaration
				// $event_name = get_event_field(&#039;event_name&#039;, EVENTS_DETAIL_TABLE, &#039; WHERE id = &#039; . $event_id);
				&#039;event_name&#039; =&gt; $event_name,
				//OPTIONAL, will place this term before the link
				&#039;separator&#039; =&gt; __(&quot; or &quot;, &#039;event_espresso&#039;)
			);

			$cart_link = event_espresso_cart_link($params);
		}else{
			$cart_link = false;
		}
		if ($display_reg_form == &#039;Y&#039;) {
			//Check to see if the Members plugin is installed.
			$member_options = get_option(&#039;events_member_settings&#039;);
			if ( function_exists(&#039;espresso_members_installed&#039;) &amp;&amp; espresso_members_installed() == true &amp;&amp; !is_user_logged_in() &amp;&amp; ($member_only == &#039;Y&#039; || $member_options[&#039;member_only_all&#039;] == &#039;Y&#039;) ) {
				echo &#039;&lt;p class=&quot;ee_member_only&quot;&gt;&#039;.__(&#039;Member Only Event&#039;, &#039;event_espresso&#039;).&#039;&lt;/p&gt;&#039;;
			}else{
			?&gt;
				&lt;p id=&quot;register_link-&lt;?php echo $event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;
					&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;Register&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt;
					&lt;?php echo isset($cart_link) &amp;&amp; $externalURL == &#039;&#039; ? $cart_link : &#039;&#039;; ?&gt;
				&lt;/p&gt;
	&lt;?php 
			}
		} else { 
	?&gt;
			&lt;p id=&quot;register_link-&lt;?php echo $event_id ?&gt;&quot; class=&quot;register-link-footer&quot;&gt;
				&lt;a class=&quot;a_register_link ui-button ui-button-big ui-priority-primary ui-state-default ui-state-hover ui-state-focus ui-corner-all&quot; id=&quot;a_register_link-&lt;?php echo $event_id ?&gt;&quot; href=&quot;&lt;?php echo $registration_url; ?&gt;&quot; title=&quot;&lt;?php echo stripslashes_deep($event_name) ?&gt;&quot;&gt;&lt;?php _e(&#039;View Details&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/a&gt; &lt;?php echo isset($cart_link) &amp;&amp; $externalURL == &#039;&#039; ? $cart_link : &#039;&#039;; ?&gt;
			&lt;/p&gt;
			
		&lt;?php
		}
	}
	?&gt;
	
&lt;/div&gt;&lt;!-- / .event-data-display --&gt;
&lt;/div&gt;&lt;!-- / .event-display-boxes --&gt;
</code>


Dean

  • Support Staff

April 9, 2014 at 10:17 am

Hi Charlie,

Please can you post large blocks of code on a service like Pastebin. It works better than our forums system and is generally easier to copy, and read.


Charlie Farrow

April 9, 2014 at 10:26 am

OK but basically I did what was asked but nothing changed. Could you help please Dean?


Lorenzo Orlando Caum

  • Support Staff

April 9, 2014 at 11:57 am

Hello,

Please repost your edits to a service like Pastebin or Gist and then link to it here.


Lorenzo


Charlie Farrow

April 9, 2014 at 12:01 pm

It looks like any new events listed are subject to this but the old ones are not. I’m going to reload the first ones.


Anonymous

April 9, 2014 at 12:59 pm

Are you running a caching plugin?

Can you link us to the page so we can view what is happening please?

Viewing 11 reply threads

The support post ‘Remove View Event link – just add to cart link’ 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 - Staging Server