Home › Forums › Ticket Products › Event Tickets Plus › remove the option to buy more than one ticket
- This topic has 5 replies, 2 voices, and was last updated 7 years, 10 months ago by
Sarah.
-
AuthorPosts
-
June 18, 2018 at 12:44 pm #1555636
Sarah
ParticipantHi I have Tickets Plus.
I learned from a customer trying to register for an event that he didn’t see the toggle from 0 to 1 and just clicked Add to Cart. When he clicked the Add to Cart button he was sent to his cart but of course the event didn’t show in his cart because he didn’t toggle from 0 to 1 and fill out additional information. Is there a way to prompt someone to toggle between 0 to 1 instead of sending them directly to the cart?June 18, 2018 at 9:47 pm #1555850Geoff B.
MemberGood evening Sarah and welcome back!
Thank you for reaching out to us.
We are sorry to hear that your customer had a confusing experience.
I would love to help you with this topic.There are a couple of things you could do to tackle this:
- There is a handful of WooCommerce third-party plugins that will let you set min and max quantity for WooCommerce products (on an individual basis).
Once you find a plugin of your liking, you will need to find the WooCommerce product related to your tickets and make sure that the product quantity is set to “1” by default.
- You could apply the following snippet in the functions.php file of your theme (without the PHP tag at the top): https://gist.github.com/cliffordp/5b57df71be8b52f595817ddbf81acdabBut first, to be extra safe, before making any changes to your functions.php file, you should make a backup of that file.
Let me know how that goes.
Best regards,
Geoff B.June 19, 2018 at 11:54 am #1556478Sarah
ParticipantThanks for the input. I’m sorry my subject to this help article was incorrectly stated. The subject was what I thought I wanted to ask but then as I wrote my question and submitted realized it didn’t fit and forgot to change it. As far as limiting my purchases to 1 it’s really easy it’s a Woocommerce inventory setting on the product page. I don’t need anything added to my theme nor an additional plugin.
Anyway, I’d like to know how to add a prompt or stop the customer from going to their cart when they click Add to cart when they haven’t added quantities or their cart is empty.
In this customers situation they had an empty cart and did not add anything to their cart I.e. toggle from 0 to 1 and they clicked the add to cart button and they were sent to the Cart page, which of course was empty. You can try it in any of my products on my site. If you click add to cart it just sends you to the cart page.
I would like to prevent the Add to cart button from sending people to the cart page until they actual want to add something to their cart. In my online shopping experiences I’ve never been directed to my cart page when clicking add to cart unless something was added by increasing the quantity. Or the add to cart button doesn’t work if I haven’t toggled the quantity or a prompt explaining how I’m supposed to add to cart will appear.
Kind regards,
SaraJune 19, 2018 at 3:55 pm #1556660Geoff B.
MemberGood evening Sarah,
Thank you for writing back and providing some more insight on what you are trying to accomplish.
The good news is that my earlier advice still stands (depending on your preferred strategy).
Basically, you can approach this in one of the two following ways:
- Circumvent the problem altogether by making sure that quantity = 0 is never displayed. In other words, you will want to make sure that the default quantity is always set to “1”.
To achieve that, my earlier suggestions would work.
- Continue to offer “0” (zero) as a quantity, but prompt the user (like you suggested).
You could apply the following snippet in the header.php or footer.php file of your theme: https://stackoverflow.com/questions/34165427/woocommerce-items-with-a-quantity-of-0-are-added-to-the-cart
For this to work, you will need to add <script> at the beginning of the snippet and </script> at the end. But first, to be extra safe, before making any changes to your files, you should make a backup of that file.
We even have one of our customers who decided to hide the button altogether until the quantity is at least “1”
Let me know how that goes.
Best regards,
Geoff B.June 29, 2018 at 8:15 am #1564515Sarah
ParticipantThank you very much for your help! I pasted the php code from the git hub link in my child theme and it worked like a champ. I wasn’t sure that I liked the required questions showing (because they used to only show when someone toggled from 0 to 1) but it’s not a big deal (probably less confusing to the customer) and it solves all of my issues without adding another plugin. Thanks again
June 29, 2018 at 9:39 am #1564630Geoff B.
MemberGood afternoon Sarah!
I am super stoked to hear that!
You are welcome back in our support forums any time 🙂
For now, I am going to close this thread.
Have a great weekend!
Geoff B.
- There is a handful of WooCommerce third-party plugins that will let you set min and max quantity for WooCommerce products (on an individual basis).
-
AuthorPosts
- The topic ‘remove the option to buy more than one ticket’ is closed to new replies.
