laurent65200 Posted July 3, 2013 Share Posted July 3, 2013 (edited) bonjour comment rajouter une colonne transporteur dans admin commande prestashop 1.5.4.1 hello how to add a column in admin command carrier Edited July 4, 2013 by laurent65200 (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted July 4, 2013 Share Posted July 4, 2013 Moved to French forum 1 Link to comment Share on other sites More sharing options...
Grafics Posted July 5, 2013 Share Posted July 5, 2013 Cela ne le prend pas en override. Il faut ouvrir le fichier AdminOrdersController.php (dans controllers/admin/) Dans la public function __construct() je te joint la fonction avec plus d'options (transporteur, id panier, id facture) public function __construct() { $this->table = 'order'; $this->className = 'Order'; $this->lang = false; $this->addRowAction('view'); $this->explicitSelect = true; $this->allow_export = true; $this->deleted = false; $this->context = Context::getContext(); $this->_select = ' a.id_currency, a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new'; $this->_join = ' LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$this->context->language->id.')'; $this->_orderBy = 'id_order'; $this->_orderWay = 'DESC'; $statuses_array = array(); $statuses = OrderState::getOrderStates((int)$this->context->language->id); foreach ($statuses as $status) $statuses_array[$status['id_order_state']] = $status['name']; $this->fields_list = array( 'id_order' => array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 25 ), 'reference' => array( 'title' => $this->l('Reference'), 'align' => 'center', 'width' => 65 ), 'new' => array( 'title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'tmpTableFilter' => true, 'icon' => array( 0 => 'blank.gif', 1 => array( 'src' => 'note.png', 'alt' => $this->l('First customer order'), ) ), 'orderby' => false ), 'customer' => array( 'title' => $this->l('Customer'), 'havingFilter' => true, ), 'total_paid_tax_incl' => array( 'title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'type' => 'price', 'currency' => true ), 'payment' => array( 'title' => $this->l('Payment: '), 'width' => 100 ), 'osname' => array( 'title' => $this->l('Status'), 'color' => 'color', 'width' => 280, 'type' => 'select', 'list' => $statuses_array, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int' ), 'date_add' => array( 'title' => $this->l('Date'), 'width' => 130, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add' ), 'id_pdf' => array( 'title' => $this->l('PDF'), 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false, 'remove_onclick' => true) ); $this->shopLinkType = 'shop'; $this->shopShareDatas = Shop::SHARE_ORDER; if (Tools::isSubmit('id_order')) { // Save context (in order to apply cart rule) $order = new Order((int)Tools::getValue('id_order')); if (!Validate::isLoadedObject($order)) throw new PrestaShopException('Cannot load Order object'); $this->context->cart = new Cart($order->id_cart); $this->context->customer = new Customer($order->id_customer); } parent::__construct(); } 1 Link to comment Share on other sites More sharing options...
laurent65200 Posted July 5, 2013 Author Share Posted July 5, 2013 mp merci Link to comment Share on other sites More sharing options...
laurent65200 Posted July 5, 2013 Author Share Posted July 5, 2013 résolu merci encore Link to comment Share on other sites More sharing options...
laurent65200 Posted July 6, 2013 Author Share Posted July 6, 2013 résolu merci Link to comment Share on other sites More sharing options...
akhawat Posted January 6, 2014 Share Posted January 6, 2014 bonjour j'ais tenté la modif mais cela ne rajoute aucune colonne dans mon tableau commande. je suis en 1.5.6.1 auriez vous une solution pour afficher le transprteur dans l'admin commande 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