Skip to content

Commit

Permalink
tyt
Browse files Browse the repository at this point in the history
  • Loading branch information
adriendelagneau committed Aug 9, 2021
1 parent cac5c64 commit 5cc0102
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Models/OrderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class OrderManager extends Manager{
/********* slides********* */
public function getOrderList($id){
$bdd = $this->dbConnect();
$req = $bdd->prepare("SELECT * FROM orderList WHERE userId = ?");
$req = $bdd->prepare("SELECT * FROM orderList WHERE user_id = ?");
$req->execute(array($id));
return $req;
}
Expand Down
19 changes: 19 additions & 0 deletions app/Views/back/listUserOrder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php ob_start();?>
<h1> Liste des commandes</h1>
<section>

<?php var_dump($allOrder) ?>
<?php foreach($allOrder as $order) { ?>
<div class="card_articles">
<div class="article_title">date de commande : <?= $order["order_date"] ?></div>

<div>

</div>
</div>
<?php } ?>

</section>
<?php $content = ob_get_clean()?>
<?php require 'templates/templateUser.php'?>

6 changes: 3 additions & 3 deletions app/Views/back/orderList.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<?php foreach($allOrder as $order) { ?>
<div class="card_articles">
<div class="article_title">numero de commande : <?= $order["id"] ?></div>
<div class="article_content">date : <?= $order["date"] ?></div>
<div class="article_content">details : <?= $order["userId"] ?>€</div>
<div class="article_title">numero de commande : <?= $order["order_id"] ?></div>
<div class="article_content">date : <?= $order["order_date"] ?></div>
<div class="article_content">prix total : <?= $order["order_price"] ?>€</div>
<div>

</div>
Expand Down

0 comments on commit 5cc0102

Please sign in to comment.