How to prevent "Add to Cart" if no tickets were selected

Home Forums Ticket Products Event Tickets Plus How to prevent "Add to Cart" if no tickets were selected

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1138469
    keystoliteracy
    Participant

    I’ve renamed “Add to Cart” to “Register” because that makes more sense for my scenario.

    However I’m afraid people won’t realize they have to select a # of tickets first – before clicking “Register” and I noticed that if they click that Register/Add to Cart button without selecting the # of tickets then it takes them to the shopping cart page with the mesage “Your cart is currently empty” which would be super confusing.

    How can I give them a validation error if they press Add to Cart with no tickets selected?

    Thanks!
    Abby

    #1138546
    Geoff B.
    Member

    Good evening Abby and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    As a first step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    For now, I am going to assume that you are using WooCommerce (since it’s the most popular solution).

    You can add a validation error by:

    1. Using a plugin to do so. E.g.: https://wordpress.org/plugins/woocommerce-incremental-product-quantities/
    2. Using some code in the functions.php file of your WordPress theme: https://www.sitepoint.com/minimum-checkout-requirements-in-woocommerce/

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1139467
    keystoliteracy
    Participant

    nevermind, I just fixed it myself with jquery

    #1139500
    Geoff B.
    Member

    Good evening Abby,

    I’m stoked that you have been able to achieve what you are looking for with jQuery. Kudos on that!

    You are welcome back on our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to prevent "Add to Cart" if no tickets were selected’ is closed to new replies.