mproject3000 Posted November 5, 2013 Share Posted November 5, 2013 Bonjour, J'utilise Prestashop: 1.5.3.1 et voudrais avoir le tri par défaut dans les catégories (front) par quantité en stock. Les seules possibilités qui se présentent actuellement dans l'admin (Préférences=>produits) sont les suivantes: - nom du produit - prix du produit - date d'ajout - position dans la catégorie - marque - date de modification Est-ce que quelqu'un sais comment ajouter le tri par par défaut par quantité en stock dans les options? Merci beaucoup pour votre aide! Bonne journée, Link to comment Share on other sites More sharing options...
mproject3000 Posted November 13, 2013 Author Share Posted November 13, 2013 up Link to comment Share on other sites More sharing options...
pixies Posted January 22, 2014 Share Posted January 22, 2014 Salut, via ftp tu vas dans ton prestashop => override/controllers/admin/AdminPPreferencesController.php Vers la ligne 108, tu changes : 'PS_PRODUCTS_ORDER_BY' => array( 'title' => $this->l('Default order by'), 'desc' => $this->l('The order in which products are displayed in the product list.'), 'type' => 'select', 'list' => array( array('id' => '0', 'name' => $this->l('Product name')), array('id' => '1', 'name' => $this->l('Product price')), array('id' => '2', 'name' => $this->l('Product add date')), array('id' => '3', 'name' => $this->l('Product modified date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Product quantity')), array('id' => '7', 'name' => $this->l('Product reference')) ), 'identifier' => 'id' ), par 'PS_PRODUCTS_ORDER_BY' => array( 'title' => $this->l('Default order by'), 'desc' => $this->l('The order in which products are displayed in the product list.'), 'type' => 'select', 'list' => array( array('id' => '0', 'name' => $this->l('Product name')), array('id' => '1', 'name' => $this->l('Product price')), array('id' => '2', 'name' => $this->l('Product add date')), array('id' => '3', 'name' => $this->l('Product modified date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Product quantity')), array('id' => '7', 'name' => $this->l('Product reference')), array('id' => '8', 'name' => $this->l('Product quantity')) ), 'identifier' => 'id' ), et ça devrait fonctionner. Link to comment Share on other sites More sharing options...
mproject3000 Posted January 22, 2014 Author Share Posted January 22, 2014 Salut, via ftp tu vas dans ton prestashop => override/controllers/admin/AdminPPreferencesController.php Vers la ligne 108, tu changes : 'PS_PRODUCTS_ORDER_BY' => array( 'title' => $this->l('Default order by'), 'desc' => $this->l('The order in which products are displayed in the product list.'), 'type' => 'select', 'list' => array( array('id' => '0', 'name' => $this->l('Product name')), array('id' => '1', 'name' => $this->l('Product price')), array('id' => '2', 'name' => $this->l('Product add date')), array('id' => '3', 'name' => $this->l('Product modified date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Product quantity')), array('id' => '7', 'name' => $this->l('Product reference')) ), 'identifier' => 'id' ), par 'PS_PRODUCTS_ORDER_BY' => array( 'title' => $this->l('Default order by'), 'desc' => $this->l('The order in which products are displayed in the product list.'), 'type' => 'select', 'list' => array( array('id' => '0', 'name' => $this->l('Product name')), array('id' => '1', 'name' => $this->l('Product price')), array('id' => '2', 'name' => $this->l('Product add date')), array('id' => '3', 'name' => $this->l('Product modified date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Product quantity')), array('id' => '7', 'name' => $this->l('Product reference')), array('id' => '8', 'name' => $this->l('Product quantity')) ), 'identifier' => 'id' ), et ça devrait fonctionner. Bonjour, Merci pour ce conseil. Par contre, chez moi, dans la version Prestashop: 1.5.3.1 dans le fichier override/controllers/admin/AdminPPreferencesController.php il n'y a que ces lignes: <?php class AdminPPreferencesController extends AdminPPreferencesControllerCore { } Link to comment Share on other sites More sharing options...
pixies Posted January 23, 2014 Share Posted January 23, 2014 Bonjour, Merci pour ce conseil. Par contre, chez moi, dans la version Prestashop: 1.5.3.1 dans le fichier override/controllers/admin/AdminPPreferencesController.php il n'y a que ces lignes: <?php class AdminPPreferencesController extends AdminPPreferencesControllerCore { Bon c'est pas trop académique mais modifie le controllers/admin/AdminPPreferencesController.php : ça t'évitera de t'embrouiller 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