function setStoreInfo($storeID, $storeInfo) { if (class_exists("ShoppingCart")) { $Store = new ShoppingCart(); $Store->setStoreID($storeID); $storeInfo = $Store->getStoreInformation(); return $storeInfo; } else { $ErrorMsgs[] = "The ShoppingCart class is not available!"; echo '<p>' . $ErrorMsgs[0] . '</p>'; return NULL; } }
session_start(); require_once '\\Controller\\ShoppingCart.php'; $storeKey = $_SESSION['storeID']; foreach ($storeKey as $key => $value) { $storeID = $key; } $storeInfo = array(); if (class_exists("ShoppingCart")) { if (isset($_SESSION['currentStore'])) { $Store = unserialize($_SESSION['currentStore']); } else { $Store = new ShoppingCart(); } //Build invenroty items on Store within $Store->setStoreID($storeID); $storeInfo = $Store->getStoreInformation(); $Store->processUserInput(); } else { $ErrorMsgs[] = "The ShoppingCart class is not available!"; echo '<p>' . $ErrorMsgs[0] . '</p>'; $Store = NULL; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html dir="ltr" lang="en-US"> <head><!-- Created by Artisteer v4.0.0.58475 --> <meta charset="utf-8"> <title>Show Cart</title> <?php