$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) { if (!$shkconf['noJQuery']) { $modx->regClientScript(SHOPKEEPER_URL . "js/jquery-1.6.3.min.js", array('name' => 'jquery', 'version' => '1.6.3', 'plaintext' => false)); } $jsSrc = "\n\t<script type=\"text/javascript\">\n\t<!--"; if ($shkconf['noConflict']) { $jsSrc .= "\r\n jQuery.noConflict();";