Posted: 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. <?php Thanks. |
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? |
|
|
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. |
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? |
|
|
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 |
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 ‘. |
|
|
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? |
|
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. |
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. //'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. |
|
|
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 I’ve sent the FTP details for you as requested. Thanks. |
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. |
|
|
Thanks Tony, I deleted line 157, as well as 150 and that did the trick after removing the text that you pointed out. Thanks. |
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.