diff --git a/.env b/.env
new file mode 100644
index 0000000..650d812
--- /dev/null
+++ b/.env
@@ -0,0 +1,2 @@
+API_URL=http://iolovolio.local/api
+SITE_URL=http://iolovolio.local
diff --git a/.env_prod b/.env_prod
new file mode 100644
index 0000000..1b65e33
--- /dev/null
+++ b/.env_prod
@@ -0,0 +1,2 @@
+API_URL=http://iolovolio.com/api
+SITE_URL=http://iolovolio.com
diff --git a/api/cart_add.php b/api/cart_add.php
new file mode 100644
index 0000000..663073c
--- /dev/null
+++ b/api/cart_add.php
@@ -0,0 +1,29 @@
+getConnection();
+
+$sid = trim($_POST['sid']);
+$pid = trim($_POST['pid']);
+$qty = trim($_POST['qty']);
+
+$_SESSION['CART'][] = array("pid" => intval($pid), "qty" => intval($qty));
+
+http_response_code(200);
+echo json_encode(
+ array(
+ "status" => 200,
+ "cart" => $_SESSION['CART']
+ ));
+
+?>
+
diff --git a/api/config.php b/api/config.php
new file mode 100644
index 0000000..d781dd4
--- /dev/null
+++ b/api/config.php
@@ -0,0 +1,8 @@
+
diff --git a/api/database.php b/api/database.php
new file mode 100755
index 0000000..6bc9823
--- /dev/null
+++ b/api/database.php
@@ -0,0 +1,35 @@
+glob =& $GLOBALS;
+ }
+
+ public function getConnection() {
+
+ $this->connection = null;
+ $this->db_host = $this->glob['CONF']['DB']['HOST'];
+ $this->db_name = $this->glob['CONF']['DB']['DB_NAME'];
+ $this->db_user = $this->glob['CONF']['DB']['USER'];
+ $this->db_password = $this->glob['CONF']['DB']['PASSWORD'];
+
+ try {
+ $this->connection = new PDO("mysql:host=" . $this->db_host . ";dbname=" . $this->db_name, $this->db_user, $this->db_password);
+ } catch(PDOException $exception) {
+ echo "Connection failed: " . $exception->getMessage();
+ }
+
+ return $this->connection;
+ }
+}
+?>
diff --git a/components/buy/buy.html b/components/buy/buy.html
index 2a95580..8709186 100644
--- a/components/buy/buy.html
+++ b/components/buy/buy.html
@@ -47,9 +47,10 @@
-