Support

Home Forums Multiple Event Registration Add-on Event Cart Widget not Showing Name of Event

Event Cart Widget not Showing Name of Event

Posted: January 29, 2014 at 1:27 pm


Rayna Diane Hennen

January 29, 2014 at 1:27 pm

Hi,
My event cart widget is not showing what I assume is supposed to be the names of the events currently in the cart. It just shows

1.
2.

with nothing next to them. Not sure where to start. Here is a screenshot to see what I mean: http://bit.ly/1jKmosy

thanks so much for your time!

Rayna


Josh

  • Support Staff

January 29, 2014 at 2:34 pm

Hi Rayna,

Is this a case where the add to cart link is being generated from the [ESPRESSO_CART_LINK] shortcode? If so, the cart link shortcode does not pass the event name automatically, but it can be added. Can you post a link to the event page so we can take a look and possibly offer more detailed suggestions?


Rayna Diane Hennen

January 29, 2014 at 2:47 pm

Hey, yes, actually it is. It’s the first time I’m using that short code.

This is a build site, I’ve taken it off ‘maintenance mode’ so if there are any weird spacings, just know it’s a WIP ๐Ÿ™‚ :

http://overflowvisible.com/mariaknecht/


Josh

  • Support Staff

January 29, 2014 at 3:47 pm

Hi Rayna,

I couldn’t find where the shortcode was. If you go to this page:

http://overflowvisible.com/mariaknecht/event-registration/

You’ll notice that when you add an event to the cart (by clicking the “Add to Cart” link that appears to the right of “Register”) the evnet name will display in the widget.

If your adding the cart link shortcode to a WP page, you can add the name of the event there too by doing something like [ESPRESSO_CART_LINK event_id=”x” event_name=”the event name”]

If you’re looking to add the add to cart links programmatically to each event details page, please let us know and we can point you in the right direction.


Rayna Diane Hennen

January 29, 2014 at 4:19 pm

Hey, thanks. I’ve added it to each event, in the event description. It is to the left of the map, in event details: http://overflowvisible.com/mariaknecht/event-registration/?ee=146

It’s not styled or anything as I was just seeing how it worked, I was planning to make it look more like a button. I like the way it looks on the /event-registration page, with the ‘Register button or Add to Cart’. Is that set up through the short code as well?

Is there any other documentation on this besides that section in Help/support so I can read more about it? (and not bug you with stuff I can probably read and figure out! ๐Ÿ™‚ )


Josh

  • Support Staff

January 29, 2014 at 6:15 pm

Hi Rayna,

The Register or add to cart that appears on the event list page doesn’t use the shortcode, it calls the add to cart function directly. We have some additional shortcode info here:

https://eventespresso.com/wiki/shortcodes-template-variables/

If you want to avoid having to enter the add to cart shortcode into each event’s description, here’s something you can add to your custom file add-on’s custom_functions.php file or in a custom snippet plugin

<?php

add_action('action_hook_espresso_social_display_buttons', 'single_custom_cart_link');

function single_custom_cart_link($event_id) {
    global $wpdb;
    $event_name = $wpdb->get_var("SELECT event_name FROM " . EVENTS_DETAIL_TABLE . " WHERE id='" . $event_id . "'");

    ?><div class="custom-cart-link" style="display:block;"> 

        <?php echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event_id.'" event_name="'.$event_name.'" anchor="Add this session to your cart"]'); ?>
    
    </div>
    <?php
}


Rayna Diane Hennen

January 29, 2014 at 7:07 pm

Great – thank you so much for your help!


Josh

  • Support Staff

January 30, 2014 at 7:13 am

You’re welcome.

The support post ‘Event Cart Widget not Showing Name of Event’ 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