Farinet Posted September 12, 2009 Share Posted September 12, 2009 J'avais besoin de trier les articles par quantité , j'ai donc ajouté la ligne suivante ( ligne 54 du fichier Admin->Tabs->AdminPPreferences.php 'PS_PRODUCTS_ORDER_BY' => array('title' => $this->l('Default order by:'), 'desc' => $this->l('Default order by for 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 added date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Quantite')),//ajout tri par quantite array('id' => '3', 'name' => $this->l('Product modified date')) ), 'identifier' => 'id'), et la on peut choisir ds l'admin le tri par quantité.si jamais sa peut servir a quelqu'un!----------Richardprestashop 1.2.3 final Link to comment Share on other sites More sharing options...
SotEW Posted September 13, 2009 Share Posted September 13, 2009 Merci pour cette contribution, Farinet, mais il ne faut pas perdre non plus le coté multilingues, ainsi, je te suggère d'utiliser plutôt : 'PS_PRODUCTS_ORDER_BY' => array('title' => $this->l('Default order by:'), 'desc' => $this->l('Default order by for 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 added date')), array('id' => '4', 'name' => $this->l('Position inside category')), array('id' => '5', 'name' => $this->l('Manufacturer')), array('id' => '6', 'name' => $this->l('Quantity')),//ajout tri par quantite array('id' => '3', 'name' => $this->l('Product modified date')) ), 'identifier' => 'id'), Et de traduire Quantity en Quantité dans l'outil de traduction, coté Admin Link to comment Share on other sites More sharing options...
Farinet Posted September 13, 2009 Author Share Posted September 13, 2009 Juste ta modification est plus élégante.merci pour ton aide Link to comment Share on other sites More sharing options...
PF22 Posted March 14, 2011 Share Posted March 14, 2011 Merci pour l'info.Pendant que j'y suis on peut trier sur d'autres paramètres ?Moi ça m'intéresserait de trier en fonction des meilleures ventes.Si vous avez une idée.Merci.Pat. 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