$client->nom = $nom; $client->update($id, $user); } /* * View */ llxHeader(); if ($_GET['id']) { $client = new BoutiqueClient($dbosc); $result = $client->fetch($_GET['id']); if ( $result ) { print '<div class="titre">'.$langs->trans("CustomerCard").': '.$client->name.'</div><br>'; print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; print "<tr>"; print '<td width="20%">Nom</td><td width="80%">'.$client->name.'</td></tr>'; print "</table>"; /* * Commandes */ $sql = "SELECT o.orders_id, o.customers_id, date_purchased, t.value as total"; $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o, ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
*/ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/boutique/osc_master.inc.php'; include_once DOL_DOCUMENT_ROOT . '/boutique/client/class/boutiqueclient.class.php'; $id = GETPOST('id', 'int'); /* * Actions */ // None /* * View */ llxHeader(); if ($id > 0) { $client = new BoutiqueClient($dbosc); $result = $client->fetch($id); if ($result) { print '<div class="titre">' . $langs->trans("CustomerCard") . ': ' . $client->name . '</div><br>'; print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; print "<tr>"; print '<td width="20%">Nom</td><td width="80%">' . $client->name . '</td></tr>'; print "</table>"; /* * Commandes */ $sql = "SELECT o.orders_id, o.customers_id, date_purchased, t.value as total"; $sql .= " FROM " . $conf->global->OSC_DB_NAME . "." . $conf->global->OSC_DB_TABLE_PREFIX . "orders as o, " . $conf->global->OSC_DB_NAME . "." . $conf->global->OSC_DB_TABLE_PREFIX . "orders_total as t"; $sql .= " WHERE o.customers_id = " . $client->id; $sql .= " AND o.orders_id = t.orders_id AND t.class = 'ot_total'"; //echo $sql; $resql = $dbosc->query($sql);