本文整理汇总了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';