Natc77 Posted February 1 Share Posted February 1 (edited) Bonjour, Sur 1.7.6.1, j'ai besoin qu'une catégorie ait une nombre de produit dans le catalogue différent du paramétrage par défaut. J'ai trouvé ce code dans ProductListingFrontController.php : $resultsPerPage = (int) Tools::getValue('resultsPerPage'); if ($resultsPerPage <= 0) { $resultsPerPage = Configuration::get('PS_PRODUCTS_PER_PAGE'); } J'ai testé, ça change bien le nombre de produit par page. Je voudrais ajouter une condition si l'id de la categorie = 97 (par exemple) alors le $resultPerPage serait différent. Mais je n'arrive pas à trouver comment on récupère l'id de la catégorie. Comment faire ? Merci pour tout aide Edited February 1 by Natc77 (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted February 1 Share Posted February 1 (int) Tools::getValue('id_category') 1 Link to comment Share on other sites More sharing options...
Natc77 Posted February 1 Author Share Posted February 1 6 minutes ago, Eolia said: (int) Tools::getValue('id_category') Super merci, ça fonctionne ! Link to comment Share on other sites More sharing options...
Eolia Posted February 1 Share Posted February 1 Ah bah oui je me doute 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now