Ajout frais de port et methode de paiement

This commit is contained in:
Rodolphe Quiedeville 2003-04-24 16:39:16 +00:00
parent 76933a541d
commit 499492b4b6

View File

@ -40,21 +40,23 @@ if ($id)
if ( $result )
{
print '<div class="titre">Fiche Commande : '.$commande->name.'</div><br>';
print '<div class="titre">Fiche Commande : '.$commande->id.'</div><br>';
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
print "<tr>";
print '<td width="20%">Numéro</td><td width="80%" colspan="2">'.$commande->id.'</td></tr>';
print '<tr><td width="20%">Date</td><td width="80%" colspan="2">'.$commande->date.'</td></tr>';
print '<td width="20%">Client</td><td width="80%" colspan="2"><a href="/boutique/client/fiche.php?id='.$commande->client_id.'">'.$commande->client_name.'</a></td></tr>';
print '<td width="20%">Paiement</td><td width="80%" colspan="2">'.$commande->payment_method.'</td></tr>';
print "<tr><td>Adresses</td><td>Livraison</td><td>Facturation</td></tr>";
print "<td>&nbsp;</td><td>".$commande->delivery_adr->name."<br>".$commande->delivery_adr->street."<br>".$commande->delivery_adr->cp."<br>".$commande->delivery_adr->city."<br>".$commande->delivery_adr->country."</td>";
print "<td>".$commande->billing_adr->name."<br>".$commande->billing_adr->street."<br>".$commande->billing_adr->cp."<br>".$commande->billing_adr->city."<br>".$commande->billing_adr->country."</td>";
print "</tr>";
print "</table>";
print "<br />";
/*
* Produits
@ -63,32 +65,34 @@ if ($id)
$sql = "SELECT orders_id, products_id, products_model, products_name, products_price, final_price, products_quantity";
$sql .= " FROM ".DB_NAME_OSC.".orders_products";
$sql .= " WHERE orders_id = " . $commande->id;
if ( $db->query($sql) )
{
$num = $db->num_rows();
$i = 0;
print "<p><table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
print '<TR class="liste_titre"><td>Produits</td>';
print '<td align="center">Nombre</td><td>Prix</td><td>Prix final</td>';
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
print '<TR class="liste_titre"><td align="left" width="40%">Produits</td>';
print '<td align="center">Nombre</td><td align="right">Prix</td><td align="right">Prix final</td>';
print "</tr>\n";
$var=True;
while ($i < $num) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
while ($i < $num)
{
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print '<td align="left" width="40%">';
print '<a href="fiche.php?id='.$objp->rowid.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" width="16" height="16" alt="Fiche livre"></a>';
print '<td><a href="fiche.php?id='.$objp->rowid.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche livre"></a>&nbsp;';
print "<a href=\"fiche.php?id=$objp->rowid\">$objp->products_name</a></TD>\n";
print '<a href="fiche.php?id='.$objp->rowid.'">'.$objp->products_name.'</a>';
print "</td>";
print '<TD align="center"><a href="fiche.php?id='.$objp->rowid."\">$objp->products_quantity</a></TD>\n";
print "<TD><a href=\"fiche.php?id=$objp->rowid\">".price($objp->products_price)."</a></TD>\n";
print "<TD><a href=\"fiche.php?id=$objp->rowid\">".price($objp->final_price)."</a></TD>\n";
print '<TD align="center"><a href="fiche.php?id='.$objp->rowid."\">$objp->products_quantity</a></TD>\n";
print "<TD align=\"right\"><a href=\"fiche.php?id=$objp->rowid\">".price($objp->products_price)."</a></TD>\n";
print "<TD align=\"right\"><a href=\"fiche.php?id=$objp->rowid\">".price($objp->final_price)."</a></TD>\n";
print "</TR>\n";
$i++;
}
print "</TR>\n";
$i++;
}
print "</TABLE>";
$db->free();
}
@ -96,15 +100,17 @@ if ($id)
{
print $db->error();
}
/*
*
*
*/
print "<br />";
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
print "<tr>";
print '<td width="20%">Total</td><td width="80%"><a href="/boutique/client/fiche.php?id='.$commande->client_id.'">'.price($commande->total_ot_total).'</a></td></tr>';
print '<td width="20%">Frais d\'expéditions</td><td width="80%">'.price($commande->total_ot_shipping).' EUR</td></tr>';
print '<td width="20%">Total</td><td width="80%">'.price($commande->total_ot_total).' EUR</td></tr>';
print "</table>";
@ -114,8 +120,6 @@ if ($id)
{
print "Fetch failed";
}
}
else
{