Okay
  Public Ticket #3753730
Redirects
Closed

Comments

  •  1
    Andrew started the conversation

    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,243
    WebWizards replied

    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
    Andrew replied

    here is the screenshot - hOzHFN.jpg

    your code snippet woked perfecelty :) 

  •  2,243
    WebWizards replied

    Good to hear that worked : ) If there's anything else I can help with, please let me know.

    Also, if you have a moment, I would really appreciate it if you considered leaving a quick rating for the plugin - it's a big help to us.