Home › Forums › Ticket Products › Event Tickets Plus › Order(s) are auto completed before pay, if tickets are added directly to basket.
- This topic has 40 replies, 5 voices, and was last updated 7 years, 2 months ago by George.
-
AuthorPosts
-
January 4, 2017 at 12:12 pm #1213387Shadi HabbalParticipant
Hello,
One thing we didn’t really like about the plugin, are the Events view + Single event page view.
They just look hideous in our BeTheme, and way different than the rest of the website’s pages.For that reason, and instead of going into overriding the templates, with (maybe) every new major update, we decided to create a normal WP page template, and use that template for every Event and/or Moodle course we sold.
This decision was just great because we no longer had to worry about different plugins templates customizations; given the fact that any WooCommerce Product can be directly added to the shopping basket, simply by using the [add_to_cart_url] shortcode.
And so, we ended up with simple yet elegant pages to sell our different kind of products, sharing the same UI base, ie:
MDL course: http://propharmace.com/pre-registration-training-programme/
Event: http://propharmace.com/mock-exam-preparation/
Event: http://propharmace.com/calculations-master-class/Long story short, we noticed yesterday after launch, that new tickets orders that have been placed directly into basket, were auto completed before any payment was made, when the user clicked “Place order” in the Checkout page.
We panicked and we went setting the auto complete feature to OFF
thinking that we better relay on the WooCommerce Autocomplete Orders plugin
but unfortunately, it didn’t help (although it’s working just fine for the Moodle courses), and new orders were set to Processing pending completion.
We were hopping to have a suggestion regarding this issue, and I hope that I have explained the situation in details.
Looking forward to hearing from you.
Regards.
January 4, 2017 at 8:08 pm #1213584Geoff B.MemberGood evening Modar and welcome back!
Thank you for reaching out to us.
I am sorry to hear that the orders were set to “Complete” immediately. Yikes!This is a much more aggressive behaviour than expected. We apologize for the inconvenience.
You did the right thing by turning off that feature for now.
You also have the right idea by using a third-party plugin that handles the WooCommerce order status.With that in mind, not all of these third party plugins are created equally.
My best recommendation would be to try a few of them out (ideally on a testing/staging server).A lot of our customers are very happy with the following snippet: https://docs.woocommerce.com/document/automatically-complete-orders/
In the end it depends on your specific setup (server, payment gateway, etc…).
Let me know how that goes.
Best regards,
Geoff B.January 5, 2017 at 4:10 am #1213678Shadi HabbalParticipantGood day Geoff,
The plugin that I use for orders autocomplete, already includes the snippet you shared, and more.
It takes care of different scenarios, including the one scenario that I need (auto completion of paid + virtual orders), because we’re planning on selling non-virtual products soon (Certificates), hence I don’t want to complete “all” kinds of orders.
But, it’s worth noting that I’m using a patched/private version of the WooCommerce Autocomplete Orders plugin, in which we added a certain behaviour, and although this added feature is working flawlessly with other products (courses, also “paid + virtual”), I might just double check that it’s not some unforseen glitch in our patch.
So, I will add some logging to the process, and wait for couple more new orders to see how things are working, and get back to you.
For the time being, thank you for stepping in for help.
Regards.
January 5, 2017 at 10:00 pm #1214198Geoff B.MemberGood evening Modar,
Thank you for writing back and providing more information.
Based on what you are saying, I would totally stand by my recommendation of a testing/staging server. This will make running tests much easier, including perhaps testing the non-modified version of https://wordpress.org/plugins/woocommerce-autocomplete-order/
Let me know how that goes and I am totally interested in seeing this through with you as I am sure it could also help other customers.
Have a great day!
Geoff B.
January 8, 2017 at 11:02 pm #1214966Shadi HabbalParticipantHello,
Here is an interesting finding,
all the tickets that are added directly to the shopping basket (as I explained earlier), don’t trigger the “woocommerce_payment_complete_order_status” event, and there is no way for the autocomplete plugin that I am using to “know” that there has been an order in the first place; despite the fact that I have disabled autocompletion by Events Tickets Plus.
PS: my personal changes on the autocomplete plugin has nothing to do with this behaviour, as there has been no change whatsoever on the actions/listeners.
Comments?
January 9, 2017 at 10:09 pm #1215626Geoff B.MemberGood evening Modar,
Thank you for sharing your findings.
I will have to discuss your findings with Dev and get back to you.As for your snippet, I do trust that you were really careful in the changes you have made.
However, as you might know, we tend to want to leave no stone unturned.
Hang in there as I do that for you!
Geoff B.
January 10, 2017 at 11:40 pm #1216394Geoff B.MemberGood evening Modar,
Just a quick note to let you know that we are looking into this.
Hang in there as we continue to pinpoint this.
Best regards,
Geoff B.
January 11, 2017 at 12:27 am #1216402Shadi HabbalParticipantThis reply is private.
January 11, 2017 at 9:19 pm #1217182Geoff B.MemberGood evening Modar,
Thank you for the files.
You are right, I see nothing obvious in these.With that in mind, I might have a snippet to use in your theme’s functions.php : https://gist.github.com/GeoffEW/c83a84cb095de4ae00b731ec929c62c8
This has not been fully tested, but it should restore behaviour similar to the original snippet provided by Woo themselves.
Let me know if that helps.
Have a great day!
Geoff B.
January 12, 2017 at 1:36 am #1217241Shadi HabbalParticipantGood morning Geoff,
I have added your snippet to my functions.php file on the staging subdomain;
then created a 100% discount coupon,
then added a ticket to the shopping basket, by placing it directly (eg. http://staging.propharmace.com/mock-exam-preparation/?add-to-cart=2287),
then proceeded with the order to the end.Unfortunately the order (despite the 0$ cost), was set to “Processing”.
January 12, 2017 at 7:01 pm #1217840Geoff B.MemberGood evening Modar,
Thank you for running a test with the snippet.
Based on what you are saying, there is something I have been meaning to ask you.
I noticed you mentioned several times that you are adding products directly to the cart (shopping basket).With that in mind, I would like to recap the situation for clarity’s sake:
- You have decided to bypass the normal event views for styling reasons.
- You opted instead for a custom and clever approach of using pages and add the tickets to the cart directly
- Because of our built-in “Try to set order to autocomplete”, the tickets were issued before actually completing the purchase order
- Shutting down that option leaves the ticket order status to “processing” (which is normal default behaviour)
- Your third-party customized auto-complete plugin is unable to automatically change the order status to “complete” on your tickets
- Using a 100% discount code after adding the snippet I just shared does not help with the auto-complete plugin’s ability to automatically set the order status to “complete”.
As you can see, there are many things at play here, hence my recommendation for a staging site.
This leads me to a couple of follow-up questions:
- Does the autocomplete plugin work properly for other products that are added to cart directly (not tickets) ? Is that also true when you are using a 100% discount code ?
- Does the autocomplete plugin work properly (without the snippet in place) if you buy a ticket through the normal event page process ?
- Does the autocomplete plugin work properly (with the snippet in place) if you buy a ticket through the normal event page process ?
- Did any of this work properly with a previous version of our plugin ?
Best regards,
Geoff B.
January 13, 2017 at 3:52 am #1217979Shadi HabbalParticipantGood morning Geoff,
Thanks for the follow up.
First I would like to correct my latest statement, because I noticed the autocomplete plugin was disabled when I ran the last test (DUH!) so I ran it again:
Unfortunately the order (despite the 0$ cost), was set to “Processing”.
The order was “Completed” by the autocomplete plugin, without the snippet code.
Now to answer your new questions:
Does the autocomplete plugin work properly for other products that are added to cart directly (not tickets) ?
Yes, it works for the other virtual products (we sell Moodle courses).
Any virtual non-excluded course is autocompleted after payment.
Any virtual excluded course is kept under “Processing” for further handling.Is that also true when you are using a 100% discount code ?
Yes. Regardless of the coupon value. I have used a 100% discount coupon in my test above so that I don’t have to enter card details or use the Testing mode in my WorldPay payment gateway.
Any (course) product that is paid for, using coupons or not, is handled as expected and autocompleted after full successful payment.Now that you mentioned it, I continued the tests with a real credit card transaction, and despite the successful payment…
Does the autocomplete plugin work properly (without the snippet in place) if you buy a ticket through the normal event page process ?
Nope. Still “Processing”.
Does the autocomplete plugin work properly (with the snippet in place) if you buy a ticket through the normal event page process ?
Looks like I hit the daily limit on this card :)) I will get back to you with an answer to this question as soon as I get a hold on another card.
Did any of this work properly with a previous version of our plugin ?
This was the first time we have chosen to do it this way (adding it directly into the shopping basket).
Regards
January 13, 2017 at 5:30 am #1218006Shadi HabbalParticipantHello again,
so..
Does the autocomplete plugin work properly (with the snippet in place) if you buy a ticket through the normal event page process ?
Nope. Still “Processing”.
January 14, 2017 at 9:36 am #1218632Geoff B.MemberGood afternoon Modar (or do you prefer Shadi ?),
Thank you for answering my follow up questions.
I will report these findings to Dev, run a few additional tests of my own and report to you with how we could workaround this stumbling block.
I wish this was a much smoother process (it normally is), so thank you for your patience as we work on untangling everything.
Best regards,
Geoff B.
January 15, 2017 at 1:50 am #1218741Shadi HabbalParticipantDear Geoff,
Thanks, and looking forward to hearing from you.
(Modar is my client’s name /license owner/, and since I’m handling all his technical issues, I just thought it would be much proper that people call me by my own name 🙂 sorry for the confusion).
Best regards
-
AuthorPosts
- The topic ‘Order(s) are auto completed before pay, if tickets are added directly to basket.’ is closed to new replies.