return; } elseif (isset($_POST['shk-id'])) { $thisPage = $modx->documentIdentifier; $orderFormPageUrl = $modx->makeUrl($shkconf['orderFormPage'], '', '', 'full'); $purchaseArray = $_POST; $shopCart->savePurchaseData($purchaseArray); $modx->sendRedirect($_SERVER['HTTP_REFERER'], 0, 'REDIRECT_HEADER'); } elseif (isset($_GET['shk_action'])) { $action = addslashes($_GET['shk_action']); switch ($action) { case "empty": $shopCart->emptySavedData(); break; case "del": $item_index = isset($_GET['n']) && is_numeric($_GET['n']) ? $_GET['n'] : ""; $shopCart->delArrayItem($item_index); break; } $modx->sendRedirect($_SERVER['HTTP_REFERER'], 0, 'REDIRECT_HEADER'); } elseif (isset($_POST['shk_recount'])) { if (!empty($_POST['count'])) { $shopCart->recountAll($_POST['count']); $modx->sendRedirect($_SERVER['HTTP_REFERER'], 0, 'REDIRECT_HEADER'); } } $headHtml = ""; if ($shkconf['style']) { $headHtml .= "\r\n <link type=\"text/css\" rel=\"stylesheet\" href=\"" . SHOPKEEPER_URL . "style/" . $shkconf['style'] . "/style.css\" />"; $modx->regClientStartupHTMLBlock($headHtml); } if ($shkconf['noJavaScript'] == false) {
} $shkconf['lang'] == $s_lang; $thisPage = $_SERVER['HTTP_REFERER']; $action = $request['action']; $shopCart = new Shopkeeper($modx, array_merge($shkconf, $defaultProp)); switch ($action) { case "fill_cart": $shopCart->savePurchaseData($request); $output = $shopCart->getCartContent($shkconf['orderFormPage'], $thisPage); break; case "empty": $shopCart->emptySavedData(); $output = $shopCart->getCartContent($shkconf['orderFormPage'], $thisPage); break; case "delete": $shopCart->delArrayItem($request['index']); $output = $shopCart->getCartContent($shkconf['orderFormPage'], $thisPage); break; case "recount": $shopCart->recountDataArray($request['index'], $request['count'], false); $output = $shopCart->getCartContent($shkconf['orderFormPage'], $thisPage); break; case "refresh_cart": $output = $shopCart->getCartContent($shkconf['orderFormPage'], $thisPage); break; default: $output = ''; break; } //added by Bumkaka $modx->minParserPasses = 2;