Support

Home Forums Event Espresso Premium shortcode to make Add to Cart link with qty 1 pre-selected?

shortcode to make Add to Cart link with qty 1 pre-selected?

Posted: November 22, 2018 at 4:55 am


lhammond

November 22, 2018 at 4:55 am

Is there a shortcode I can use in EE4 to replace the functionality of ESPRESSO_CART_LINK from EE3?

I know I need to display the ticket selector, but all of our events only have one ticket and one time slot, so it would be nice to have a function I could call to display a button that would automatically add one to the cart (and then if they need more quantity they can modify it in the cart itself). If there is not a shortcode to do this, might there be a code snippet I can use to help me get there?

Thanks!


Tony

  • Support Staff

November 22, 2018 at 6:24 am

Hi there,

Not currently no, EE3 allowed you to add an event to the cart, then select tickets before proceeding. EE4 requires you add tickets to the cart and whilst they may be linked to an event, it’s a totally different design.

One option is to continue to use the ticket selector but hide all of the details and use some jQuery, (such as THIS) to set the default qty to 1 on the ticket selector.

Would that work for you?

The support post ‘shortcode to make Add to Cart link with qty 1 pre-selected?’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 11 months, 3 weeks ago ago

Topic Tags

Tagged: , ,

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!