summaryrefslogtreecommitdiff
path: root/classes/Cart.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Cart.php')
-rw-r--r--classes/Cart.php71
1 files changed, 0 insertions, 71 deletions
diff --git a/classes/Cart.php b/classes/Cart.php
deleted file mode 100644
index 4e6f585..0000000
--- a/classes/Cart.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-class Cart
-{
-
- public function checkout()
- {
-
- }
-
- public function addOrder()
- {
- // get cart from cookie
- // VITAL: validate + sanitize
- //
- // then
- //
- // get address and contact details from post
- }
-
-
- /** history
- * get the last $limit cart-orders
- * @param $limit (int)
- */
- public function history($limit)
- {
- // SELECT O.* , OP.* , P.*
- // FROM orders O
- // lEFT JOIN order_products OP ON OP.oid = O.id
- // LEFT JOIN products P ON P.id = OP.pid
- // WHERE uid = :uid
- // AND O.id IN (
- // SELECT id FROM orders WHERE uid = :uid
- // ORDER BY id DESC
- // )
- //
- // $items = runLimitQuery(sql, [uid = $this->uid], 10)
- //
- // oranize in results = [
- // {
- // oid,
- // prods: [
- // {
- // pid,
- // prodlabel,
- // count
- // },
- // ...
- // ]
- // },
- // ...,
- // ]
- //
- // return $results
-
- }
-}
-
-
-
-/* ---
-orders:
- : id
- : uid (user id)
-
-order_products
- : id
- : oid (order id)
- : pid (product id)
- -- */ \ No newline at end of file