Support

Home Forums Event Espresso Premium Adding venue info to shopping cart items

Adding venue info to shopping cart items

Posted: August 12, 2013 at 3:57 pm


Hugo Azzolini

August 12, 2013 at 3:57 pm

Hi.

I am looking to add some venue-specific info to the cart page, specifically directly before the <table class="price_list"> element.

However, the venue shortcode isn’t working.

Can you advise me on how to get venue info onto that page.

Thanks.


Dean

August 13, 2013 at 3:16 am

Have you used do_shortcode?

eg

<?php echo do_shortcode('[ESPRESSO_VENUE id="1"]'); ?>


Hugo Azzolini

August 13, 2013 at 6:21 am

I have tried that.

The issue is we have events at multiple venues, so it is imperative that we pull venue info from the event that’s in the cart.

I realize that setting the Venue ID to a variable, based on the event ID is necessary, I just cannot find any documentation on how to return the venue ID using the event_espresso_shopping_cart() function.


Dean

August 13, 2013 at 6:52 am

Sorry I meant the [ESPRESSO_VENUE event_id=”8″] shortcode, so it would be

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

That will grab the venue/s associated with the event/s in the cart.


Hugo Azzolini

August 13, 2013 at 7:04 am

Partial success: it’s spitting out the info for all of the venues.

I will troubleshoot and share my findings.

Thanks for the quick reply!


Hugo Azzolini

August 13, 2013 at 7:21 am

SUCCESS!

The working code: <?php echo do_shortcode('[ESPRESSO_VENUE event_id="'.$r->id.'"]'); ?>


Hugo Azzolini

August 13, 2013 at 7:22 am

And the entire custom shopping_cart.php file: http://pastebin.com/GErnZ9Rm


Dean

August 13, 2013 at 11:39 pm

I’m glad you got it working and thanks for sharing the results!

The support post ‘Adding venue info to shopping cart items’ 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