Home › Forums › Ticket Products › Event Tickets Plus › Login to RSVP and Login to Purchase
- This topic has 9 replies, 4 voices, and was last updated 7 years, 6 months ago by Darren Healy.
-
AuthorPosts
-
October 9, 2016 at 5:18 am #1174216Darren HealyParticipant
Hi there,
Currently, the login to RSVP and login to purchase links on RSVP’s and tickets takes you to the actual WordPress admin login page, however given that this is used in conjunction with WooCommerce it should go to the ‘My Account login page’ equivalent. How would I change this?
After the customer has created their account on the correct page what should then happen is a re-direct back to the event page where the whole process started, with the customer logged in.
Can this be done?
Darren
Please not – I am developing the site where I hope to use the plugin locally at this point in time so I cannot give you the correct URL.
October 9, 2016 at 11:02 am #1174285GeorgeParticipantHey Darren,
Thanks for reaching out. Your comments about the login flow here and other aspects of the workflow are interesting, and are worth considering for sure. Our ticketing plugins don’t just support WooCommerce, so any feature change we make needs to be nimble enough to provide same or similar support for all four eCommerce plugins we support.
This doesn’t mean that changes to better support the sort of flow you mention here won’t ever make their way into our plugins, or that your feedback isn’t good feedback — I just wanted to set the expectation early that it can take a while for changes like this to arrive in a proper plugin update, given the balancing-act of feature parity I touched on above….
In the meantime, you can certainly make it so that folks are redirected to their WooCommerce login page instead of the wp-login.php screen. You’d need to use the filter tribe_tickets_ticket_login_url to change the login URL.
I wrote a snippet for you here that does just that:
function tribe_make_login_to_purchase_go_to_woo_my_account_login( $original_login_url ) {
$new_url = esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) );
if ( empty( $new_url ) ) {
return $original_login_url;
}return $new_url;
}add_filter( 'tribe_tickets_ticket_login_url', 'tribe_make_login_to_purchase_go_to_woo_my_account_login' );
☝️ Try adding that to your site and let us know if it helps!
Cheers,
GeorgeOctober 11, 2016 at 7:28 am #1174890RonParticipantHello,
Thanks George for this solution. I also have this problem. But I don’t understand how I can use the filter. And where do I apply the code?
Thanks.October 11, 2016 at 8:58 am #1174919GeorgeParticipantHey Ron,
You would have to enter this code in your theme’s functions.php file. If you are not familiar with how to do that, I would recommend searching online for “how to edit WordPress theme files” — there are many tutorials out there! 😀
— George
October 11, 2016 at 11:25 am #1175080RonParticipantHello George,
Yes I know how to do that but I didn’t realize you meant the functions.php file. Anyway I tried it, but without effect. But maybe it is a little different in my case, so here are the details.
I’m using Event Tickets Plus V4.2.7.1 with WooCommerce V2.6.4, all latest version.
When I’m logged in I can see the “Add to Cart”-button going to mysite/cart/. When I’m logged out I see the “Login to purchase”-text going to mysite/wp-login.php?redirect_to=http://mysite/event/***/
I hope you can help me with this to find a solution.
Cheers,
Ron- This reply was modified 7 years, 6 months ago by Ron.
October 12, 2016 at 9:14 am #1175407RonParticipantHello George,
Just let you know, it works, the link changed, thanks! First I tried it with a child theme but that didn’t work somehow but I will figure that out later.
Now the only thing is, the “add to cart” button is only visible after signing in. Is it also possible to add something in the cart, then sign in or register?
Cheers,
RonOctober 12, 2016 at 10:13 am #1175501GeorgeParticipantHi Ron,
Glad to hear about some progress here. When it comes to the “Add to Cart” button, this is not something our plugins provide so I am not sure why your add-to-cart button behaves as it does.
I would recommend contacting your theme developer or WooCommerce for further assistance on that to help ensure it is visible no matter whether the user is logged in or not.
If you have further questions or follow-ups, Ron, no worries! But can you please open a new thread on these forums?
@Darren, did the code I wrote for you help at all? Let us know! 😀
Thanks,
GeorgeOctober 13, 2016 at 8:08 am #1175933Darren HealyParticipantHi again,
Yes this worked for me so thanks very much for that! But I still think re-directing back to the specific event page in which a user clicked on the “login to…” should be in place – it makes the user experience much better and I bet many users of your stuff would agree. Is there any fix you can suggest I try?
October 16, 2016 at 7:37 am #1177448GeorgeParticipantHey Darren,
Glad to hear I could help. The other functionality you specify there is indeed possible but would require more complicated custom coding.
We are not able to help with custom coding in these forums. I put together a simple “redirect” snippet above that redirects to the Woo login page instead of the WP login page, and hope it’s a good start — but tracking the event they originally clicked from requires a bit more finesse.
I encourage you to either tinker with the snippet I shared above to add the extra functionality you describe, or to check out the customization resources we have here if you’re interested in hiring someone to make this a reality ? http://theeventscalendar.com/customizations
Best of luck with your project!
George -
AuthorPosts
- The topic ‘Login to RSVP and Login to Purchase’ is closed to new replies.