Okay
  Public Ticket #3825117
Agent - Switch to customers
Closed

Comments

  • Tom started the conversation

    Hi,

    Is there a hook / action I can use to redirect an Agent to a specific page when they click Shop as Customer?

    I also would like the Agent to automatically switch back to the agent dashboard once check out has been completed.


    Thanks


    Tom

  •  2,330
    WebWizards replied

    Hello Tom,

    Thank you for purchasing the plugin,

     

    To set a different redirect link when an agent clicks on Shop as customer, please add this PHP snippet to your site:

    https://pastecode.io/s/fudp3m3o

     

    Regarding switching back automatically when the checkout is complete, this is more complex, but I think I was able to write a code snippet for it:

    https://pastecode.io/s/iirjc1ej

    This basically loads a script that clicks on that button, when the 'order received' page is reached. This may need some testing to make sure it works well, as the timing and how the script loads may differ depending on the site.

     

    Kind regards,

    Stefan