本文整理匯總了PHP中ShoppingCart::getStoreInformation方法的典型用法代碼示例。如果您正苦於以下問題:PHP ShoppingCart::getStoreInformation方法的具體用法?PHP ShoppingCart::getStoreInformation怎麽用?PHP ShoppingCart::getStoreInformation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ShoppingCart
的用法示例。
在下文中一共展示了ShoppingCart::getStoreInformation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setStoreInfo
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;
}
}
示例2: array
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
include 'header.php';