Support

Home Forums Event Espresso Premium Copy From drop down not showing event name

Copy From drop down not showing event name

Posted: October 1, 2013 at 9:22 pm

Viewing 5 reply threads


lhammond

October 1, 2013 at 9:22 pm

This was a problem in my old version, and I’m still seeing it in the dev site on which I installed 3.1.35.P – When registering multiple attendees for a single event, the “copy from” drop down box is not showing the event name. Each option just says ” – Tuition – Attendee x” (the number is correct). I thought it used to show the event name, e.g. “My Running Class – Tuition – Attendee 1”. Any idea how to fix this?


Dean

October 1, 2013 at 11:43 pm

Hi,

The dropdown works fine on a test installation (3.1.35) – it is showing the event name correctly.

Your site has numerous template modifications, it might well be something in there. You could try temporarily renaming the espresso folder to force the plugin to use the defaults and see if the dropdown issue persists.


lhammond

October 2, 2013 at 1:04 pm

I tried renaming the uplooads/espresso folder, and it didn’t work at first (because I already had added the class to my cart before renaming the folder), but then I did see the event name in the drop-down. I went through and started putting files back in my uploads/espresso/templates folder one by one to see when it would break again, and apparently something I did in espresso_table.php must have overwritten the event name variable that gets passed into the cart and through to the registration page.

Do you know what the variable name is that is used for the event name in that drop-down? I have no idea how or why I would have unset it (it must be a session variable?) in espresso_table.php, but I’d love some help in what to look for. Thanks!


lhammond

October 2, 2013 at 1:19 pm

The difference I found is that my “Add to Cart” button doesn’t have the event name in the URL. I am creating that button with the shortcode as below:

$add_to_cart_button = do_shortcode('[ESPRESSO_CART_LINK anchor="Add to Cart" event_id="'.$event->id.'" direct_to_cart=0]');

So what might be making that shortcode not get the event name?


lhammond

October 2, 2013 at 2:00 pm

I found a work-around: I copied the following code from event_list_display.php and used that for the add to cart link instead, and it worked.

$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' => '',
//REQUIRED
'event_name' => $event->event_name
);
$cart_link = event_espresso_cart_link($params);

I’d still like to know why the shortcode didn’t work. I believe it was not working when the only file I had in my uploads folder was the espresso_table.php file, so I don’t think I overwrote the function or session variables manually or anything.

Could there be a bug with the shortcode?


Dean

October 3, 2013 at 4:36 am

Hi,

First off, thank you. You have found something here that could be easily overlooked.

It appears that the shortcode is looking for the event name in a variable called $event_name, but that variable is empty. The main $events array doesn’t contain it either. I have handed this over to the developers to look into and fix.

Viewing 5 reply threads

The support post ‘Copy From drop down not showing event name’ 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