Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 8. Read the updated version of this page
The legacy Dispatcher and the Symfony Router are in charge of parsing incoming HTTP requests and finding the right Controller to return HTTP response.
The Front office controllers lie in the controllers/front
directory.
The Dispatcher matches a given HTTP request with a Front Office controller.
When you visit /
on your shop, you are being returned the Homepage unless you have your shop installed in a subdirectory, then /your_subdirectory
is your Homepage.
What happened behind the scenes is that:
index.php
main routing file that relies on the DispatcherIndexController
IndexController
calls the index
Smarty view to be rendered, populated with PHP objectsIf you send another HTTP request, the same sequence will happen
The Back Office is split between the legacy part and the migrated part.
The legacy backend relies on controllers you can find in the controllers/admin
directory.
The Symfony backend relies on controllers you can find in src/PrestaShopBundle/Controller/Admin
.
The Back Office routing matches a given HTTP request with a Controller.
When you visit /admin{x}/index.php?controller=AdminCarriers&token={y}
on your shop, PrestaShop returns the Carriers Back Office HTML page.
What happened behind the scenes is that:
/admin-{xxx}/index.php
Back Office routing file. This file detected no Symfony route matches your request so it relied on the Dispatcher to handle your query.AdminCarriersController
When you visit /admin-{xxx}/index.php/configure/shop/preferences/preferences?_token={yyy}
on your shop PrestaShop returns the Preferences Back Office HTML page.
What happened behind the scenes is that:
/admin-{xxx}/index.php
Back Office routing file. This file booted the Symfony kernel to handle your request.PreferencesController
@PrestaShop/Admin/Configure/ShopParameters/preferences.html.twig
Twig view to be rendered, populated with PHP objectsIf you send another HTTP request, the same sequence will happen