jp77 Posted January 6, 2011 Share Posted January 6, 2011 bonjour a tous je cherche depsuipas mal de temps a ajouter dans le BO coté liste commandes 1 colonne texte avec le nom de la Société losqu'il existe bien sur car je travaille avec beaucoup de Sté.J'ai réussi a ajouter une colonne, mais impossible de faire apparaitre de nom de la Company devant Client.Je ne trouve pas qu'elle ligne je dois appeler apres la ligne 46 de Adminorders.php j'ai créer celle ci la collne apparait mais est vide 'address_company' => array('title' => $this->l('Company'), 'widthColumn' => 160, 'width' => 90, 'filter_key' => 'company', 'tmpTableFilter' => true), Qui aurais une idée ?Merci d'avance a tous Link to comment Share on other sites More sharing options...
jp77 Posted February 10, 2011 Author Share Posted February 10, 2011 bonjour je remonte cette demande depuis le 6 janvier resté sans réponsemerci a tous si une personne connais le nom du champsa bientôt Link to comment Share on other sites More sharing options...
leeloo Posted February 10, 2011 Share Posted February 10, 2011 Salut,Inspire toi de ce post sur lequel il est expliqué comment ajout le transporteur dans le tableau des commandes :http://www.prestashop.com/forums/viewthread/73987/developpement/affiche_le_transporteur_dans_l_admin_section_commande Link to comment Share on other sites More sharing options...
jp77 Posted February 11, 2011 Author Share Posted February 11, 2011 bonjour leelomerci du tuyaux mais le lien est faux cordialement Link to comment Share on other sites More sharing options...
jp77 Posted February 11, 2011 Author Share Posted February 11, 2011 bonjour a touscette fois j'ai besoin d'un AS du php.dans AdminOrders.php j'ai ajouté une colonne comme ceci : 'invoice_address' => array('title' => $this->l('Company'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'company', 'tmpTableFilter' => true),pour faire apparaitre le nom de la société avant lastnamedans AdminCustomers.php comme ceci : 'invoice_company' => array('title' => $this->l('Company'), 'width' => 80),les colonnes existe mais sont vide.donc 2 solutions :1) je ne sais pas qu'elle fonction appeller2) company est uniquement du texte ? par contre il existe dans la base sqlComment faire ?Ce serais très pratique car pour ma part ce sont souvaent des entreprises et cela me permettrais de savoir laquelle.merci d'avance de votre aide Link to comment Share on other sites More sharing options...
leeloo Posted February 12, 2011 Share Posted February 12, 2011 Qu'entendstu par le lien est faux ? Link to comment Share on other sites More sharing options...
jp77 Posted February 12, 2011 Author Share Posted February 12, 2011 Qu'entendstu par le lien est faux ? bonjour c'est le lien du post que j'ai fait pas celui ajour transporteurcordialement Link to comment Share on other sites More sharing options...
leeloo Posted February 12, 2011 Share Posted February 12, 2011 OK, j'ai eu du mal a comprendre que tu voulais dire. Et puis j'ai finalement vu que que j'ai copié-colle le lien de ton post au lieu de mettre le lien vers le post que je te proposais. C'est rectifié en espérant que cela t'aide.Bon w-e Link to comment Share on other sites More sharing options...
jp77 Posted February 14, 2011 Author Share Posted February 14, 2011 bonjour leeloje regarde ce la de pret dès que possible Merci de ton aide Link to comment Share on other sites More sharing options...
jp77 Posted February 21, 2011 Author Share Posted February 21, 2011 bonjour leeloJ'ai eu un peu de temps pour regarder cela de pret.la difference est le nom de la company existe dans la base sql contrairement au transporteur.j'ai donc modifié ceci en ajoutant la ligne rose, mais cela affiche le numero pas le nom de la company: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 AND so.valid = 1) > 1, 0, 1) as new, (SELECT COUNT(od.`id_order`) FROM `'._DB_PREFIX_.'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `'._DB_PREFIX_.'order_history` oh ON (oh.`id_order` = a.`id_order`) LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.intval($cookie->id_lang).')'; $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; $statesArray = array(); $states = OrderState::getOrderStates(intval($cookie->id_lang)); foreach ($states AS $state) $statesArray[$state['id_order_state']] = $state['name']; $this->fieldsDisplay = array( 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'id_address_invoice' => array('title' => $this->l('Company'), 'widthColumn' => 160, 'width' => 100,), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 120, 'width' => 100, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'left', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => 100), 'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false)); parent::__construct();Apres 2 heures d'essais je ne trouve pas comment faire, un peu d'aide serait la bien venue.merci d'avance Link to comment Share on other sites More sharing options...
jp77 Posted March 8, 2011 Author Share Posted March 8, 2011 re bonjour a tous Malgré plusieurs essais impossible d'inserer le nom de la company devant le nom du client, voici mon bout de code :si vous avez une idée je suis vraiment preneurMerci d'avance Link to comment Share on other sites More sharing options...
jp77 Posted March 10, 2011 Author Share Posted March 10, 2011 re bonjourAprès beaucoup de recherche je suis arrivé a faire apparaitre le nom de la company dans liste de command, mais cela duplique les lignes de commande, dans le cas ou le client a plusieurs adresses.Qui peut me donner un coup de main ?j'ai ajouté ligne 29 :ad.`company` AS `company`,ligne 49:'company' => array('title' => $this->l('company'), 'widthColumn' => 160),Merci d'avance a tous Link to comment Share on other sites More sharing options...
InfoValis Posted March 11, 2011 Share Posted March 11, 2011 Ça y est j'y suis arrivéVoilà tout :Ligne 29 du fichier AdminOrders.php remplacer ça : osl.`name` AS `osname`, os.`color`, par osl.`name` AS `osname`, addr.company, os.`color`, Ligne 37 remplacer ça : LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.intval($cookie->id_lang).')'; Par ça : LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `'._DB_PREFIX_.'address` addr ON (addr.`id_address` = a.`id_address_delivery`) LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.intval($cookie->id_lang).')'; Puis ligne 50 remplacer ça : 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), par 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'company', 'tmpTableFilter' => true), 'company' => array('title' => $this->l('Company'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), Chez moi ça fonctionne nikel 1 Link to comment Share on other sites More sharing options...
jp77 Posted March 11, 2011 Author Share Posted March 11, 2011 bonjour supremak super cela marche nickel a conditin de changer aussi plus haut addr.`company` AS `company`,a la place de ad.`company` AS `company`,c'est avec les ad oh etc que je me melange les crayons je suppose que cela appelle les colonnes de chaque ID ?merci Vraiment super plus que une modification a faire dans 1 autre fichier du module producteditle l'exploitation sera plus simple.vraiment merci cordialement Link to comment Share on other sites More sharing options...
InfoValis Posted March 11, 2011 Share Posted March 11, 2011 C'est bon j'ai corrigé le post :coolsmile: Link to comment Share on other sites More sharing options...
jp77 Posted March 11, 2011 Author Share Posted March 11, 2011 Super 1 question vous connaissez un peu le Php pour une modif ?merci Link to comment Share on other sites More sharing options...
InfoValis Posted March 11, 2011 Share Posted March 11, 2011 dit toujours Link to comment Share on other sites More sharing options...
jp77 Posted March 11, 2011 Author Share Posted March 11, 2011 Voila j'ai ajouter ce module joint que j'ai déja modifier et qui est tres pratique.Par contre en sur la ligne "si rupture de stock" j'aimerais si possible faire apparaitre le detail de la fiche produit, mais une partie n'est pas stocker dans la table.merci d'avance de ton aide productedit.zip Link to comment Share on other sites More sharing options...
jp77 Posted March 11, 2011 Author Share Posted March 11, 2011 autre chose j'ai modifier ta ligne LEFT JOIN `'._DB_PREFIX_.'address` addr ON (addr.`id_address` = a.`id_address_delivery`) de façon a avoir l'adresse de facturatio a la place de livraison comme ceci :LEFT JOIN `'._DB_PREFIX_.'address` addr ON (addr.`id_address` = a.`id_address_invoice`) et aussi ajuster les largeur de colonnea bientot Link to comment Share on other sites More sharing options...
hulk Posted December 26, 2011 Share Posted December 26, 2011 bonjour et merci pour ce post qui m'a aidée a résoudre partiellement mon problème. je m'explique: je vais récupérer l' ID de mes commandes qui existent dans une autre table sous format booléens (c fait à l’aide de ce post) après j'ajoute une autre colonne dans la liste des commandes ou sera affiché une petite icône (en se basant a l'exemple de l'icône NEW) cliquable vers une autre page mais j'ai réussi a afficher seulement l'icône sans lien!!! avec cette ligne 'voir' => array('title' => $this->l('Details'), 'align' => 'center', 'width' => 20,'icon' => array(0 => 'icon.gif', 1 => 'blank.gif')), Link to comment Share on other sites More sharing options...
hulk Posted December 29, 2011 Share Posted December 29, 2011 up plz 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