abahou Posted August 22, 2013 Share Posted August 22, 2013 Bonjour, je cherche une solution pour afficher le nom du transporteur dans la partie commande version 1.5.4.0 de prestashop. j'ai cherché dans le forum j'ai trouvé une solution mais pour la version 1.4.6.2. et merci Link to comment Share on other sites More sharing options...
abahou Posted August 23, 2013 Author Share Posted August 23, 2013 finalement je trouve une solution, je la partage si jamais y a quelqu'un qui en aura besoin !!! il faut créer un nouvea fichier override " AdminOrdersController.php" dans "/override/controllers/admin/AdminOrdersController.php" et y mettre le code suivant : <?php class AdminOrdersController extends AdminOrdersControllerCore { public function __construct() { parent::__construct(); $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'carrier` crr ON (crr.`id_carrier` = a.`id_carrier`)'; $this->_select = 'crr.`name` AS `carrier_name`,'.$this->_select; $pos = 7; // ça permet de positionner la case transporteur dans le tableau $this->fields_list = array_slice($this->fields_list, 0, $pos, true) + array( 'carrier_name' => array( 'title' => $this->l('Transporteur '), 'width' => 100, ) ) + array_slice($this->fields_list, $pos, count($this->fields_list)-$pos, true); } } n'oubliez pas de supprimer le fichier cache : "/cache/class_index.php " pour mettre à jour les controlleur Link to comment Share on other sites More sharing options...
akhawat Posted January 3, 2014 Share Posted January 3, 2014 fonctionne sur 1.5.6.1 merci super Link to comment Share on other sites More sharing options...
akhawat Posted January 6, 2014 Share Posted January 6, 2014 je rectifie ca bloque j'ais un message :comme quoi le name_carrier ne correspond pas dans la field list. ou puis je trouver la field list contenant les nom des transporteurs ? merci Link to comment Share on other sites More sharing options...
sekar33 Posted January 6, 2015 Share Posted January 6, 2015 Bonjour, marche nickel sur 1.6 merci 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