yZ0 Posted July 9, 2012 Share Posted July 9, 2012 Bonjour, simple question, comment peut-on ajouter des infos supplémentaires sur la commande dans le back office : téléphone, ajouter une colonne référence dans le récapitulatif, le groupe par défaut du client. Ayant essayé de modifié le fichier adminOrders.php, aucun changements n'apparait même après avoir vidé le cache. Merci d'avance. Link to comment Share on other sites More sharing options...
franckm1000 Posted July 9, 2012 Share Posted July 9, 2012 Bonjour, Quelles modifications avez vous apportées ? Vous avez utilisé les classes ou fait des requêtes sur les tables de la base ? Link to comment Share on other sites More sharing options...
yZ0 Posted July 9, 2012 Author Share Posted July 9, 2012 Aucune requête, j'ai simplement essayé d'ajouter une colonne "reference" dans le recapitulatif de la commande, en ajoutant un td, mais aucune modifications n'est prise en compte Link to comment Share on other sites More sharing options...
franckm1000 Posted July 9, 2012 Share Posted July 9, 2012 (edited) Fichier AdminOrders.php vers la ligne 856: <tr> <th align="center" style="width: 60px"> </th> <th>'.$this->l('Product').'</th> <th style="width: 80px; text-align: center">'.$this->l('UP').' <sup>*</sup></th> <th style="width: 20px; text-align: center">'.$this->l('Qty').'</th> '.($order->hasBeenPaid() ? '<th style="width: 20px; text-align: center">'.$this->l('Refunded').'</th>' : '').' '.($order->hasBeenDelivered() ? '<th style="width: 20px; text-align: center">'.$this->l('Returned').'</th>' : '').' <th style="width: 30px; text-align: center">'.$this->l('Stock').'</th> <th style="width: 90px; text-align: center">'.$this->l('Total').' <sup>*</sup></th> <th colspan="2" style="width: 120px;"><img src="../img/admin/delete.gif" alt="'.$this->l('Products').'" /> '.($order->hasBeenDelivered() ? $this->l('Return') : ($order->hasBeenPaid() ? $this->l('Refund') : $this->l('Cancel'))).'</th> <th style="width:90px;text-align:center">'.$this->l('Référence').'</th>'; echo ' </tr>'; J'ai ajouté la dernière ligne: <th style="width:90px;text-align:center">'.$this->l('Référence').'</th>' Voilà ce que j'obtiens ensuite: Version de prestashop utilisée: 1.4.6.2 Dans Préférences => Performances, Forcer la compilation est-il sur "OUI" et Cache sur "NON" ? Edited July 9, 2012 by franckm1000 (see edit history) Link to comment Share on other sites More sharing options...
devprestacom Posted July 9, 2012 Share Posted July 9, 2012 Bonjour, S'il s'agit de la liste des produits d'une commande, c'est bien labas, mais il ne faut pas oublier de mettre la valeur de la colonne. Cordialement, Link to comment Share on other sites More sharing options...
yZ0 Posted July 9, 2012 Author Share Posted July 9, 2012 Effectivement c'est bien ce que j'avais fait, mais impossible d'accéder aux commandes avec ces modifs. Ma version 1.4.8 Link to comment Share on other sites More sharing options...
franckm1000 Posted July 9, 2012 Share Posted July 9, 2012 Que se passe il ? tu as une erreur ? une page blanche ? le display error est sur on ou off ? Link to comment Share on other sites More sharing options...
yZ0 Posted July 9, 2012 Author Share Posted July 9, 2012 C'est bon c'est réglé, simple erreur de syntaxe. Merci de votre aide. Sinon comment peut on afficher le groupe par défaut du client ? Link to comment Share on other sites More sharing options...
franckm1000 Posted July 9, 2012 Share Posted July 9, 2012 (edited) Essaie peut être ça: $sql=Db::getInstance()->getRow('select id_default_group from '._DB_PREFIX_.'customer where id_customer='.(int)($order->id_customer)); echo $sql['id_default_group']; Edited July 9, 2012 by franckm1000 (see edit history) Link to comment Share on other sites More sharing options...
yZ0 Posted July 11, 2012 Author Share Posted July 11, 2012 merci franck, je récupère bien l'id du groupe par défaut. Un petit "if" pour tester la valeur et c'est réglé. Merci encore. Link to comment Share on other sites More sharing options...
utaku Posted July 6, 2013 Share Posted July 6, 2013 Hello, Quelqu'un serait-il comment appliqué cette astuce mais pour prestashop 1.5.X ( je suis en 1.5.2 ) Merci d'avance bien à vous Entre-Copines Link to comment Share on other sites More sharing options...
utaku Posted July 7, 2013 Share Posted July 7, 2013 Hello, bon j'ai trouver ou était l'endroit à modifier, mais la ligne de code si dessus n'est plus valable pour une 1.5.X Le fichier à modifier ce trouve dans admin/themes/default/template/controllers/orders/helpers/view/ Il s'agit du view.tpl à la ligne 590 Merci d'avance à qui pourrait m'aide Link to comment Share on other sites More sharing options...
utaku Posted July 10, 2013 Share Posted July 10, 2013 UP Personne ne sait comment faire pour que cela fonctionne sur la 1.5 ? j'ai donc réussi à crée la colonne Référence, il ne me reste plus qu'a trouver la petite formule magique pour récuprer les informations nécessaire afin que celle-ci soit afficher. Merci d'avance Bien à vous Link to comment Share on other sites More sharing options...
Recommended Posts