Jump to content

How to create redirect by using Prestashop code


Przemysław Suszek

Recommended Posts

If you have Prestashop 1.7.7, you can use the "actionFrontControllerInitBefore" hook. If you have an earlier version, you can do these checks, in the init() method, from the FrontController class. 

You can check the request in the variable $ _SERVER ['REQUEST_URI'], and depending on it, do the redirect. You can use the redirect() method from the Tools class.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...