<?php /** * Created by PhpStorm. * User: István * Date: 2015.12.13. * Time: 14:38 */ require_once $_SERVER['DOCUMENT_ROOT'] . "/rftCandyShop/Model/ListingUtilities.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/rftCandyShop/Model/UserAsCustomer.php"; session_start(); $lu = new ListingUtilities(); $user = unserialize($_SESSION['actUser']); $productID = $_GET['t_id']; $qauntity = $_GET['qauntity']; $productData = $lu->getProductByPID($productID); $user->getCart()->addProduct(Product::createProductByArray($productData), $qauntity); $_SESSION['actUser'] = serialize($user);
<?php /** * Created by PhpStorm. * User: István * Date: 2015.12.12. * Time: 15:05 */ require_once $_SERVER['DOCUMENT_ROOT'] . "/rftCandyShop/Model/ListingUtilities.php"; $sName = $_GET['sName']; $sCategory = $_GET['sCategory']; $lu = new ListingUtilities(); $result = $lu->listingProducts($sName, $sCategory); $products = []; session_start(); $size = count($result); if ($size == 0) { echo "<p>0 találat</p>"; } else { echo "<p>{$size} találat</p>"; foreach ($result as $product) { // $products[$product['t_azon']] = new Product($product); $tId = $product['t_azon']; $name = $product['nev']; if ($product['akcio'] > 0) { $decrease = $product['akcio']; $originPrice = $product['egysegar']; $price = $product['egysegar'] * (1 - $decrease / 100); } else { $price = $product['egysegar']; $decrease = "";
<source src="/rftCandyShop/Model/medias/candy_shop.mp3" type="audio/ogg"> </audio> </div> <div class="head object2"> </div> </div> <div id="mainContainer"> <div id="workzone"> <nav> <span>Kategóriák</span> <ul> <?php $lu = new ListingUtilities(); $categories = $lu->listingProductsGroups(); foreach ($categories as $k => $v) { echo "<li id='{$k}' class='category'>{$v}</li>"; } session_start(); if (isset($_SESSION['actUser'])) { echo '<li><button type="button" id="watchorders">Rendeléseim megtekintése</button></li>'; } ?> </ul> </nav> <div class="objectSearch"> <label for="searchName">Termék neve: </label><input type="text" name="searchInput" id="searchName"/> <label for="searchCategory">Kategória:</label>
<?php /** * Created by PhpStorm. * User: István * Date: 2015.12.14. * Time: 22:41 */ require_once $_SERVER['DOCUMENT_ROOT'] . "/rftCandyShop/Model/UserAsCustomer.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/rftCandyShop/Model/ListingUtilities.php"; session_start(); $user = unserialize($_SESSION['actUser']); $lu = new ListingUtilities(); $array = $lu->listingCustomerOrdersByItsId($user->getId()); $orders = $array[0]; $orderDetails = $array[1]; foreach ($orders as $o) { $orderNum = $o["rend_szam"]; $orderDate = $o["rend_datum"]; $delAddress = $o["szall_cim"]; $billAddress = $o["szam_cim"]; $status = $o["stat_megnev"]; echo "<div id=' {$orderNum} ' class='watchorder'><table>"; echo <<<Otable <tr> <th>Rendelés szám</th> <th>Rendelés dátuma</th> <th>Szállítási cím</th> <th>Számlázási cím</th> <th>Rendelés státusza</th> </tr>