Refactored SASS and addingToCart.php to the correct folders

This commit is contained in:
CodeServer
2021-08-03 11:36:49 +01:00
parent 916892fa1e
commit d5b349342a
12 changed files with 18 additions and 16 deletions
-36
View File
@@ -1,36 +0,0 @@
<?php
include '../php/connection.php';
$conn = connectMysql();
session_start();
$product_id = $_GET['product_id'];
$product_name = $_GET['product_name'];
$product_price = $_GET['product_price'];
$quantity = (int)$_GET['quantity'];
$mycar = $_SESSION['mycar'];
if(array_key_exists($product_id, $mycar)){
$mycar[$product_id]['buy_num'] += $quantity;
$mycar[$product_id]['buy_price'] += $product_price*$quantity;
} else {
$mycar[$product_id] = array('buy_id'=>$product_id, 'buy_name'=>$product_name, 'buy_price'=>0, 'buy_num'=>$quantity);
$mycar[$product_id]['buy_price'] += $product_price*$quantity;
}
if($_GET[clear]=="yes"){
$_SESSION['mycar']="";
}
$_SESSION['mycar'] = $mycar;
header('location: cart.php');
?>
+1 -1
View File
@@ -42,7 +42,7 @@
<div class="col-sm-12">
<section class="shopping_productDetails">
<h1><?=$product['Product_Name']?></h1>
<form action="addingToCart.php" method="get">
<form action="../php/addingToCart.php" method="get">
<img src="../img/<?= $product['Product_Img'];?>" style="width: 300px; height: 100%; padding:10px; border: 1px solid black;">
<h2 style="font-size: 40px;text-transform: uppercase; "></h2>