Home › Forums › Ticket Products › Event Tickets Plus › Send ticket on payment complete – mixed cart
- This topic has 9 replies, 3 voices, and was last updated 9 years, 7 months ago by
Brook.
-
AuthorPosts
-
August 12, 2016 at 6:35 am #1150912
Ingo Storl
ParticipantHi there,
I know this topic has been discussed a lot already, however my issue cannot be fixed by adding the “auto complete orders” plugin or code snippet.
This is due to the fact that we also sell other products not just virtual or digital products, which means if a customer has a mixed cart with, let’s say, books and a ticket. Automatically completing this order is not correct even though the payment might have been received already. The order is only completed once the book has been sent out and the order properly processed.
But I need for the ticket to be sent out after payment is received and for the rest of the order to still be in process but not completed. How can this be done? I am aware that you only provide limited customization support, but I really would need this to be managed somehow.
Thanks for your help in advance!
Regards
IngoAugust 12, 2016 at 12:17 pm #1151103Brook
ParticipantHowdy Ingo,
I would love to help you with this.
This should be manually possible right now. When payment is received go to the order, click Actions > Resend Order Emails > Tickets. It will say “resend” regardless of whether it was sent or not. And there you go, customer has their tickets, order status has not changed, and you can move it to complete once you fulfill the rest of the order.
You could make that happen automatically with a little code too. It’s most on the WooCommerce side. You will just need to tap into one of their hooks that runs when an order is charged. Now check to see if that order contains tickets, if it does run:
do_action( 'wootickets-send-tickets-email', $order_id );
And the tickets email will get sent out.
Does that all make sense? Does that answer your questions? Please let me know.
Cheers!
– Brook
August 16, 2016 at 6:59 am #1152029Ingo Storl
ParticipantHi Brook, thanks for your reply.
I am no programer so this is probably gonna be really tricky for me or simply impossible, seeing that I would like to go for the automatic option. I mean, adding snippets to the functions.php – that I can do and maybe a bit more than that too 🙂
If you could maybe be more specific: WooCommerce side – which files are you referring to?
One of their hooks – which one?Could you explain the process of implementing the code a bit further? I am willing to study up on how to use hooks and would try and get this sorted with your help – if that’s possible, with your limited customization support and all…
Thanks Brook, looking forward to hearing from you
Regards
Ingo-
This reply was modified 9 years, 8 months ago by
Ingo Storl.
August 16, 2016 at 10:58 pm #1152447Brook
ParticipantHowdy Ingo,
I’d definitely love to help you as much as I can. Ordinarily it is up to you to write this code, but I can probably convince the higher ups to make an exception. I’ll get back to you tomorrow, hopefully with a little more research for you under my belt and some more specific instructions.
’til then.
– Brook
August 17, 2016 at 2:42 am #1152478Ingo Storl
ParticipantThank you so much Brook!!
August 19, 2016 at 12:37 am #1153515Ingo Storl
ParticipantHi Brook, I haven’t heard back from you yet.
Have you managed to get some more insight on how to resolve my issue? Would really appreciate your help on this matter. Thanks again in advance for your efforts.
Regards
IngoAugust 23, 2016 at 9:32 am #1154829Brook
ParticipantHowdy Ingo,
I am sorry it took me a bit to get back to you. I was not able to get much buyoff on this, their thinking was that this is an edge case that not a lot of people are facing.
However I do think I found a simple way of doing this. I have not had a chance to test it yet, but inserting this in your theme’s functions.php would likely do the trick:
function tribe_woocommerce_payment_complete_send_email( $order_id ) { do_action( 'wootickets-send-tickets-email', $order_id ); } add_action( 'woocommerce_payment_complete', 'tribe_woocommerce_payment_complete_send_email' );Does it?
Cheers!
– Brook
August 24, 2016 at 3:19 am #1155261Ingo Storl
ParticipantHi Brook, thanks for getting back to me.
I have added the code to my functions.php and it’s working beautifully so far.
Thanks again, you’re a star!
Best regards
IngoAugust 25, 2016 at 12:09 am #1155669Brook
ParticipantYou are very welcome Ingo! I am so happy that worked. Thank you for getting back!
– Brook
-
This reply was modified 9 years, 8 months ago by
-
AuthorPosts
- The topic ‘Send ticket on payment complete – mixed cart’ is closed to new replies.
