questions about how to customize login re-direction

Hello,

I have started providing IT support and development for a company using CS-Cart. The company is a single store that sells uniforms for public safety organizations, but they set up each PSO as a separate store front.

The primary website is for guests and represents the company. I want to customize the login process so that if someone logs into the default store site and they have an account tieds to a different store, they will be re-directed to the store (company_id?) associated with their account.

Searching the forums, I found some related comments:

  1. “Try to use app/addons/my_changes/controllers/common/auth.pre.php file since auth.php controller forces redirect after login”
  2. " You can use the login_user_post hook in the fn_login_user function (app/functions/fn.users.php) to check customer user group and make redirect"

I’ve read through some of the developer documentation about my_changes but I don’t see an actual example of how it works or how you add changes under it. Can anyone point me to some additional information that would help with this topic?

Hi!

I recommend you to check the following section in the documentation: