本文整理汇总了PHP中Checkout::getID方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::getID方法的具体用法?PHP Checkout::getID怎么用?PHP Checkout::getID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::getID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printHeader
echo printHeader($checkout->getTitle(), NULL);
?>
<div class="container">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<?php
echo "<a href='checkouts.php'><span class='glyphicon glyphicon-chevron-left'></span> Back to Checkouts</a>";
?>
<br /><br />
<div class="panel panel-default">
<div class="panel-heading text-center">Checkout Details</div>
<div class="panel-body text-center">
<p>
<?php
printf("<strong>Checkout ID:</strong> %s<br /><br />", $checkout->getID());
printf("<strong>Description:</strong> %s<br /><br />", $checkout->getDescription());
if (!empty($checkout->getDRNumber())) {
echo "<strong>DR:</strong> " . $checkout->getDRNumber() . "<br /><br />";
}
if (!empty($checkout->getLocation())) {
echo "<strong>Location:</strong> " . $checkout->getLocation() . "<br /><br />";
}
$personName = getPersonName($checkout->getPerson());
printf("<strong>Person:</strong> %s<br /><br />", $personName);
$co_start = new DateTime($checkout->getStart());
$co_end = new DateTime($checkout->getEnd());
printf("<strong>Start Time:</strong> %s<br /><br />", $co_start->format('m-d-y g:iA'));
printf("<strong>End Time:</strong> %s<br /><br />", $co_end->format('m-d-y g:iA'));
if ($checkout->getReturned()) {
$retDate = new DateTime($checkout->getReturned());
示例2: foreach
$co->setDescription($description);
$co->setLocation($location);
$co->setDRNumber($dr_number);
foreach ($gearList as $gearItem) {
$gearObject = new Gear();
$gearObject->fetch($gearItem);
//echo ">1";
if ($gearObject->availableQty($co_start, $co_end) > 1) {
$co->addToGearList($gearItem, $gearQty[$i]);
$i++;
} else {
$co->addToGearList($gearItem, 1);
}
}
$co->finalizeCheckout();
$co_id = $co->getID();
header("Location: checkout.php?co_id={$co_id}");
}
}
}
}
//end if POST
//increment step
$step++;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- INCLUDE BS HEADER INFO -->