Support

Home Forums Multiple Event Registration Add-on Add to Cart Link in registration_page_display.php support

Add to Cart Link in registration_page_display.php support

Posted: October 11, 2012 at 3:03 pm


Mark

October 11, 2012 at 3:03 pm

I added the following to my registration_page_display.php and moved it and the registration_page.php to the uploads templates folder.

?php echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event->id.'" anchor="Add to Cart"]'); ?>

However, when I go to view the event page and click add to cart and then click view cart link, there appears to be no id associated with it on the page because this is what i’m seeing from the source file id=”cart_link_” so when I view the cart it is empty.

Is there a way to add the cart link to the template file so my staff doesn’t have to add the [ESPRESSO_CART_LINK] shortcode to every single event?


Josh

  • Support Staff

October 11, 2012 at 3:10 pm

Hi there,

In the registration_page_display.php template, the event ID variable is $event_id.

So the shortcode will look like this:

<?php echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event_id.'" anchor="Add to Cart"]'); ?>


Mark

October 11, 2012 at 3:15 pm

oop,thanks Josh. (-: Good catch. Sorry to take up some of your time. Appreciate your help as always.

The support post ‘Add to Cart Link in registration_page_display.php support’ 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