// set buttons
$p->setVar("buttonSAVE", "ms_save");
$p->setVar("buttonORDER", "ms_goToOrder");
+
// set hidden fields
+ if ($_GET["isOrder"] == "true")
+ $hiddenfields .= "<input type=\"hidden\" name=\"ms_isOrder\" value=\"true\" />\n";
+
$p->setVar("IS_HIDDEN", "true");
$p->setVar("HIDDENAREA", $hiddenfields);
$comments = "";
if (!isEmpty($shippingAddress = $cart->getShippingAddress()))
- $shippingAddress .= " (<a href=index.php?mode=editShippingAddress>".i18n("Change")."</a>)";
+ $shippingAddress .= " [<a href=index.php?mode=editShippingAddress>".i18n("Change")."</a>]";
else
- $shippingAddress = "(<a href=index.php?mode=editShippingAddress>".i18n("Add")."</a>)";
+ $shippingAddress = "[<a href=index.php?mode=editShippingAddress>".i18n("Add")."</a>]";
if (!isEmpty($comments = $cart->getOrderComments()))
- $comments .= " (<a href=index.php?mode=editOrderComments>".i18n("Change")."</a>)";
+ $comments .= " [<a href=index.php?mode=editOrderComments>".i18n("Change")."</a>]";
else
- $comments = "(<a href=index.php?mode=editOrderComments>".i18n("Add")."</a>)";
+ $comments = "[<a href=index.php?mode=editOrderComments>".i18n("Add")."</a>]";
$p->setVar("CUST_SHIPPINGADDRESS", $shippingAddress);
$p->setVar("CUST_COMMENTS", $comments);
$p->setVar("TOTALSUM", $lang->getPrice($totalsum));
// set edit links
- $p->setVar("linkEDIT_SHIPPINGADDRESS", "index.php?mode=editShippingAddress");
- $p->setVar("linkEDIT_COMMENTS", "index.php?mode=editOrderComments");
+ $p->setVar("linkCHANGE_CART", "index.php?mode=cart&isOrder=true");
// set buttons
-
+ $p->setVar("buttonORDERTICKETS", "ms_orderTickets");
// create page
$parser->setVAR("PAGE", $p->parseFile("orderoverview.html"));
// forward to order login when order button in cart is pressed
if (isset($_POST["ms_goToOrder"])) {
- Header("Location: index.php?mode=orderLogin");
+ if ($_POST["ms_isOrder"] == "true")
+ Header("Location: index.php?mode=orderOverview");
+ else
+ Header("Location: index.php?mode=orderLogin");
exit();
}
/** saves the shipping address */
function saveShippingAddress()
{
- $error = ErrorManager::singleton();
-
if (isset($_POST["ms_saveShippingAddress"])) {
// check if loggedin
exit();
}
}
+
+function orderTickets()
+{
+ if (isset($_POST["ms_orderTickets"])) {
+
+ // check if loggedin
+ $session = new WebSession();
+ if (!$session->isAuthorized()) {
+ Header("Location: index.php");
+ exit();
+ }
+
+ $cart = new Cart($_COOKIE[COOKIE_CART]);
+ if ($cart->isValid()) {
+
+ }
+ }
+}
?>
\ No newline at end of file
</fieldset>
</div>
<div id="tickets">
-<h2>Karten:</h2>
+<h2>Karten:</h2>[<a href="@linkCHANGE_CART@">Ändern</a>]
<table class="ms_Table">
<tr>
<th>Veranstaltung</th>
<form action="@FULLURL@" method="POST">
<div class="ms_ButtonArea">
-<input type="submit" id="ms_button_order" name="ms_order" @attribDISABLED@ value="Jetzt bestellen!" />
+<input type="submit" id="ms_button_order" name="@buttonORDERTICKETS@" @attribDISABLED@ value="Jetzt bestellen!" />
</div>
</form>
</div>
\ No newline at end of file