Support

Home Forums Event Espresso Premium Removing register link/view details – just add to cart link

Removing register link/view details – just add to cart link

Posted: October 7, 2013 at 4:24 am

Viewing 11 reply threads


Ben

October 7, 2013 at 4:24 am

Hi Guys,

Can you confirm the code that needs to be removed to hide the ‘register link/view details’ so I can just have the ‘add to cart’ link showing.

Am I in the right area of the Event_list_display.php file here, and to then upload that back in.
?>
<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
" href="<?php echo $registration_url; ?>" title="<?php echo stripslashes_deep($event_name) ?>"><?php _e('Register', 'event_espresso'); ?>
<?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
</p>
<?php
}
} else {
?>
<p id="register_link-<?php echo $event_id ?>" class="register-link-footer">
" href="<?php echo $registration_url; ?>" title="<?php echo stripslashes_deep($event_name) ?>"><?php _e('View Details', 'event_espresso'); ?> <?php echo isset($cart_link) && $externalURL == '' ? $cart_link : ''; ?>
</p>

<?php
}
}
?>

Thanks.


Tony

  • Support Staff

October 7, 2013 at 5:11 am

I would advise you to copy both event_list_display.php and event_list.php to wp-content/uploads/espresso/templates and modify them there.

You have an ‘else’ in the code you have posted, so if you delete that make sure you ‘close the if’.

You could actually delete from line 142 to line 162 if not using member functions.

I’m assuming you are adding the the ADD_TO_CART shortcode within the event description?


Ben

October 7, 2013 at 5:24 am

Thanks Tony,

The event list.php is causing extra code to appear, and no add to cart link at all – http://screencast.com/t/4AvA8f4d

Do I need to amend event_list.php?

Thanks.


Tony

  • Support Staff

October 7, 2013 at 5:51 am

That code is within the for-each loop so is likely the event_list_display.php file causing it.

Do you have an ESPRESSO_CART link within the description? Actually it looks like you may have display event description set to off, if so that wont work anyway.

Do you want it not to display any content, just the add to cart link?


Ben

October 7, 2013 at 5:59 am

Yes, the cart link is within the description – [ESPRESSO_CART_LINK anchor=”Buy tickets for this show” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”]

As you pointed out correctly, my client doesn’t want to have any description apart from the date and the add to cart link.

The event_list_display.php, & event_list.php have to be detailed out in the custom functions file, right? – http://screencast.com/t/bvU4ty2EUE


Tony

  • Support Staff

October 7, 2013 at 7:02 am

The code within the screenshot, is this within custom_includes.php from the custom files add-on? (or any of the files included within that add-on?)

If so then it is un-needed. The core template files are checked within the core for modified versions. (It depends on which file but files included within event-espresso/templates are all checked)

wp-content/uploads/espresso/templates is checked before loading the core files, if versions of the files are included there they will be loaded instead.

Because the descriptions are set to not display the ESPRESSO_CART shortcode within the description will also not display. You need to undo the modifications before to event_list_display.php and delete only line 150, then comment out line 135 to remove the ‘ or ‘.


Ben

October 7, 2013 at 8:29 am

Thanks Tony,

I’ve removed the custom_includes.php, undone the previous amendments, and removed line 150, and ‘or’ from 135. Just the event_list_display.php file in templates, nothing has changed. Added the event_list.php and that throws up the loop code error appearing.

I can turn description on as there is no description except the cart link, if that works. Except I’ve tried it for 1 event, and that doesn’t make any changes.

Any ideas?


Ben

October 7, 2013 at 10:36 am

Am I missing something Tony?

I’ve followed your instructions, and for some reason the view details is still being pulled through. Does that code appear on any of the other templates?

Thanks.


Tony

  • Support Staff

October 8, 2013 at 2:32 am

Hi bbradley,

Some templates use two files rather than one and as such need to be moved in pairs. event_list & event_list_display is an example of this.

Right now you should have those two files in /wp-conent/uploads/espresso/templates.

event_list.php should not be modified.
event_list_display.php should have line 150 removed and line 135 I would just comment the full line so it now reads:

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

Is it possible to get login details for the site so I can advise exactly what you need to change. If so please send via https://eventespresso.com/send-login-details/

*Please note FTP Details are required in this case.


Ben

October 8, 2013 at 10:19 am

Thanks Tony,

I’ve done all that, and this is the error code appearing once the event_list.php is added – http://screencast.com/t/YqpJHpwRhvYm
In reference to line 432 which looks like an ‘if’ ‘else’ argument.

I’ve sent the FTP details for you as requested.

Thanks.


Tony

  • Support Staff

October 8, 2013 at 3:43 pm

Hi bbradley,

In uploads/espresso/templates/event_list_diplay.php line 41

(HwiV2%Dd)fZ

That is whats causing your problems. That should not be there, I have no idea what it is 🙂

Just leave the closing php tag and remove ‘(HwiV2%Dd)fZ’

One other thing to note, in one of your replies you posted the shortcode [ESPRESSO_CART_LINK anchor=”Buy tickets for this show” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”] on the event list if you want the text ‘Buy tickets for this show’ rather than add to cart alter the ‘anchor’ on line 130

Hope that helps.


Ben

October 9, 2013 at 12:01 am

Thanks Tony,

I deleted line 157, as well as 150 and that did the trick after removing the text that you pointed out.

Thanks.

Viewing 11 reply threads

The support post ‘Removing register link/view details – 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