Jump to content

Afficher le Nom & Prénom du client dans le listing des Bons de Réduction


Recommended Posts

Bonjour TLM,
Voici une petite modification qui permet d'afficher le Nom et Prénom du client dans la liste des Bon de réduction.

C'est tout simple:

Ligne 28 & 29:
Remplacer

$this->_select = 'dtl.`name` AS discount_type';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'discount_type` dt ON (dt.`id_discount_type` = a.`id_discount_type`)
               LEFT JOIN `'._DB_PREFIX_.'discount_type_lang` dtl ON (dt.`id_discount_type` = dtl.`id_discount_type` AND dtl.`id_lang` = '.intval($cookie->id_lang).')';


Par

$this->_select = 'dtl.`name` AS discount_type, c.`firstname` AS `Nom`,c.`lastname` AS `Prenom`';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'discount_type` dt ON (dt.`id_discount_type` = a.`id_discount_type`)
               LEFT JOIN `'._DB_PREFIX_.'discount_type_lang` dtl ON (dt.`id_discount_type` = dtl.`id_discount_type` AND dtl.`id_lang` = '.intval($cookie->id_lang).')
               LEFT JOIN '._DB_PREFIX_.'customer c on (c.id_customer = a.id_customer)';




Ligne 42 Ajouter:

'Nom' => array('title' => $this->l('Nom'), 'width' => 100),
'Prenom' => array('title' => $this->l('Prénom'), 'width' => 100),



Voici ce que cela donne.
Pour ceux qui veulent, en Pièce jointe le fichier complet (AdminDiscounts.php)
Bonne Journée.

32832_PBhumoaxuHdetW5MqtFi_t

AdminDiscounts.php

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...