Jump to content

Back Office - Ajouter le nom de la société


SebbC

Recommended Posts

Bonjour,

 

Je cherche à ajouter le nom de société dans le back Office (version 1.4.5.1).

J'ai réussi sans problème sur la page "Clients".

 

Je ne m'en sort pas sur la partie commandes, la colonne société est créée, mais je n'arrive pas à faire la jointure des tables pour la tableau des commandes, un petit coup de pouce me serait nécessaire, merci à ceux qui voudront bien m'appuyer dans cette modification.

 

Le code à modifier est celui la je pense : (AdminOrders.php - a partir de la ligne 34)

 

$this->table = 'order';
  $this->className = 'Order';
  $this->view = true;
 $this->colorOnBackground = true;
  $this->_select = '
  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,
  (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` = '.(int)($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`)';

 

Merci,

 

Sébastien

Link to comment
Share on other sites

  • 1 month later...

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...