Jump to content

How and where prestashop discover target object by URL ?


SVP

Recommended Posts

For example, when i visit to URL="demo.prestashop.com/en/blouses/2-blouse.html"

How engine undestand what i must see

1. product page

2. product page with product id = 2

 

I try to found any table in DB with generated url and corresponding object and found nothing.

 

May be engine try to extract id from name by pattern, but as i see, some modules can

totally remove id from URL and engine can work and after this.

 

Can someone point me to any class where this work performed.

 

TY.

 

 

Link to comment
Share on other sites

All happens in the Dispatcher class, getController().

 

Performs a regex against the url to determine the controller to load, it recognizes the product url form and loads the Product front controller.

 

(it does extract the product id from the url)

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...