Home › Forums › Ticket Products › Event Tickets Plus › Require input before adding to cart
- This topic has 14 replies, 2 voices, and was last updated 6 years, 4 months ago by ksministries.
-
AuthorPosts
-
November 29, 2017 at 2:08 pm #1395275ksministriesParticipant
Hello we are using Events Tickets Plus with Events Calendar and we have an event where we are offering 3 different types of tickets. Each ticket input field is currently set to zero per the instructions below which is fine especially when offering multiple ticket types. The problem however is that the customer is able to select the Add to Cart button and because the input fields are all at zero nothing is added to the cart when picked on. I realize this is better than if all tickets were set to 1 because then the customer would end up with all 3 tickets in their cart. Is there no way to make it a required action that if they try to add to the cart without first making there selection it will ask them to please make a selection first?
https://theeventscalendar.com/knowledgebase/handling-ticket-quantities/
December 1, 2017 at 7:44 am #1396610AndrasKeymasterHi ksministries,
Thanks for reaching out!
Using a javascript / jQuery approach would be best probably.
A colleague whipped up this snippet some time ago which is supposed to do what you need.
Please give it a try and let me know how it works out.
https://gist.github.com/elimn/30c533fad7ee5ce4c3cb8a0f727c7190
Cheers,
AndrasDecember 1, 2017 at 7:56 am #1396618ksministriesParticipantWhere do I place this in our function.php?
December 4, 2017 at 2:05 am #1397647AndrasKeymasterHi,
Sorry, yes, in your theme’s (preferably child theme’s) functions.php file.
Andras
December 6, 2017 at 8:33 am #1399467ksministriesParticipantHello this did work for the need we had but would there be a way to remove the red outline that is created around the add to cart button? I looked in the supplied code but did not see any reference to color there? Thx
December 7, 2017 at 3:12 am #1400130AndrasKeymasterHello,
Happy to hear that worked.
I checked this page of yours, but didn’t see any red outline. Can you share a URL where the issue is visible?
Thanks!
AndrasDecember 7, 2017 at 4:12 am #1400172ksministriesParticipantSorry about that because of the red outline we ended up not using the code thou I did just re-add it long enough to take a screenshot for you. Thank you again for your continued support.
December 7, 2017 at 4:59 am #1400184AndrasKeymasterNot quite sure what that is happening. If you can leave it on the live site a bit I can take a look at it tomorrow (or later today) and let you know how to fix that with css.
Or if you have a staging / test site that’s even better.
A.
December 7, 2017 at 5:02 am #1400185AndrasKeymasterYou can try this:
.single-tribe_events .add-to-cart .tribe-button { border: unset; }
or like this:
.single-tribe_events .add-to-cart .tribe-button { border: none; }
If they wouldn’t do anything then an ‘!important’ might be necessary, like this:
.single-tribe_events .add-to-cart .tribe-button { border: unset !important; }
Let me know if that does the trick.
A.
December 7, 2017 at 5:19 am #1400186ksministriesParticipantThis reply is private.
December 7, 2017 at 5:26 am #1400192ksministriesParticipantI sent you a private message with URL after trying the three examples of CSS please let me know if you did not receive it? Thanks again.
December 8, 2017 at 1:44 am #1401027AndrasKeymasterThanks for the URL! I checked it and it’s actually not a border, but a box shadow. Sneaky little thing. 🙂
You should be able to get rid of it like this:
.single-tribe_events .add-to-cart .tribe-button { box-shadow: none; }
Hope this will fix it for good. Let me know.
Cheers,
AndrasDecember 8, 2017 at 12:45 pm #1401565ksministriesParticipantThank you that did it.
December 11, 2017 at 3:03 am #1402666AndrasKeymasterStoked to hear that helped!
Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please create a new ticket and we’ll be happy to help.
Cheers,
AndrasPS: If you like our plugins, and you didn’t yet do so 🙂 we would be happy to receive a review in the wordpress.org repository. Thanks!
https://wordpress.org/support/view/plugin-reviews/the-events-calendar/
https://wordpress.org/support/view/plugin-reviews/event-tickets/PS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!
-
AuthorPosts
- The topic ‘Require input before adding to cart’ is closed to new replies.