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
All venues show up in my cart | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium All venues show up in my cart

All venues show up in my cart

Posted: October 2, 2013 at 9:10 am

Viewing 9 reply threads


Sarah Rogers

October 2, 2013 at 9:10 am

Hello,

I’m using the venue shortcode in my theme and it works perfectly – except in my cart where it shows ALL of my venues.

http://kindragoehler.com/mbi/funny/event-registration/?regevent_action=show_shopping_cart

Is there a way to hide this?

Thank you!


Anonymous

October 2, 2013 at 1:54 pm

Hi Sarah,

Which venue shortcode are you using? It looks like just [ESPRESSO-VENUE]

All venues are shown when no event_id is set, either manually, globally or through the URL.

So in order to only show one event you need pass the shortcode a Venue ID or an Event ID which has a venue assigned to it.

http://staging.eventespresso.com/wiki/shortcodes-template-variables/#venue

So the shortcode [ESPRESSO-VENUE id=4] would load the venue with id 4.
[ESPRESSO-VENUE event_id=27] would load the venue assigned to event with ID 27.


Sarah Rogers

October 2, 2013 at 2:28 pm

Do you mean something like this?

<?php echo do_shortcode("[ESPRESSO_VENUE event_id=" . $event->id . "]"); ?>


Josh

October 2, 2013 at 3:46 pm

Usually it’s:

<?php echo do_shortcode('[ESPRESSO_VENUE event_id="' . $event_id . '"]'); ?>

Note the single and double quotes. The variable for the event ID will depend on what is already set.

Is the event_id variable is set/coded into the theme?


Sarah Rogers

October 2, 2013 at 3:53 pm

Thanks Josh the event_id variable isn’t coded into the theme by this part – it’s outside the loop, if you will. I know how to get around that in WordPress – but not in EE :)


Dean

  • Support Staff

October 3, 2013 at 1:50 am

Hi,

On the shopping cart page the event details are held in an array called $result.

So if you wanted to show the event venues I would use something like

id . ‘”]’);
}
?>

There is already a foreach loop in the shopping-cart.php that you can add the shortcode into if needed.

However I havent tested that fully, and it may not work in a sidebar, it depends on how you have things set up.


Sarah Rogers

October 3, 2013 at 9:21 am

Hey Guys,

I don’t want any venues to show in my shopping cart. Right now I’m using just the <?php echo do_shortcode("[ESPRESSO_VENUE]"); ?> in my sidebar outside the EE “loop”. Any idea about how to hide the venues when the shopping cart is invoked?


Sidney Harrell

  • Support Staff

October 3, 2013 at 10:10 am

Wrap that do_shortcode in a conditional, if ($_GET[‘regevent_action’]==’show_shopping_cart’).

<?php if ($_GET['regevent_action']=='show_shopping_cart') {
   echo do_shortcode("[ESPRESSO_VENUE]");
 } ?>


Josh

October 3, 2013 at 10:19 am

Hi Sarah,

Here’s one idea:

<?php 
global $this_event_id;

if (isset($this_event_id))
echo do_shortcode("[ESPRESSO_VENUE]"); 

?>


Sarah Rogers

October 3, 2013 at 10:29 am

Hi Josh – that solution worked PERFECTLY!

Thank you. You guys have provided awesome support :)

I’ve recommended EE to several of my clients and I’m actually starting another project using it today.

Viewing 9 reply threads

The support post ‘All venues show up in my cart’ 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