Public Ticket #3753730

Redirects

Closed
Comments
1 Ticket 1
Andrew started the conversation 2 years ago on October 29, 2024 at 4:25pm

hey, are there any settings or hooks / filters we can use to redirect users to a specific product page after logging in? We are setting up email campaigns with links to products but the user gets redirected to the /my-account/ page first to ogi in. we want to then reidrect them to a product URL. we have added custom code to our site but it appears the B2B King plugin is overriding this code

2,762
KingsPlugins replied 2 years ago on October 30, 2024 at 12:24pm

Hello Andrew,

Thank you for getting in touch with us,

 

  • Could you please share a screenshot of your settings under B2BKing -> Settings -> Access Restriction ? (the area here https://prnt.sc/gieaQO10AgtE )

 

B2BKing does not normally affect the login redirect, but it sounds like you may have a restriction on logged out users that redirects to my account, or some visibility settings to set certain products as only visible to logged in users.

 

Generally I think the solution could be the following:

  1. Instead of having direct links to products in your emails, set up links with the form "https://site.com/my-account?redirect=https://site.com/your-product-link-here".
  2. Add this snippet to your site: https://pastecode.io/s/gk5thq3h

 

Kind regards,

Stefan

 

1

Sign In