Support

Home Forums Event Espresso Premium Displaying event category on shopping cart

Displaying event category on shopping cart

Posted: October 29, 2013 at 1:05 pm

Viewing 1 reply thread


Wesley Deer

October 29, 2013 at 1:05 pm

Is there any way to get an event’s category to display on the shopping cart page?
For instance as a class appended to the each event’s div container

ie:
<div class=”[category_identifier] multi_reg_cart_block event-display-boxes ui-widget” id =”multi_reg_cart_block-<?php echo $r->id ?>”>


Josh

  • Support Staff

October 29, 2013 at 2:21 pm

Hi Wesley,

Yes. You can replace line 65 of the current versions shopping_cart.php file with this:

<div class="<?php echo sanitize_title_with_dashes(do_shortcode('[CATEGORY_NAME event_id="'.$r->id.'"]'));?> multi_reg_cart_block event-display-boxes ui-widget"  id ="multi_reg_cart_block-<?php echo $r->id ?>">

Note the use of sanitize_title_with_dashes to allow for the safe use of category names that have spaces

Viewing 1 reply thread

The support post ‘Displaying event category on shopping 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