Пример #1
0
        break;
    case 'clear':
        tsv_clear_cart();
        break;
    case 'info':
        //echo tsv_display_infoblock($cache); break;
        $output = $modx->parseDocumentSource(tsv_display_infoblock($cache));
        break;
    case 'basket':
        $output = tsv_display_cart($cache, "basket");
        break;
    case 'checkout':
        $output = tsv_display_cart($cache, "checkout");
        break;
    case 'recalc':
        //echo tsv_display_cart($cache, "checkout"); break;
        $output = $modx->parseDocumentSource(tsv_display_cart($cache, "checkout"));
        break;
}
//added by Dmi3yy
$modx->minParserPasses = 2;
$output = $modx->mergeSettingsContent($output);
$output = $modx->mergeChunkContent($output);
$output = $modx->evalSnippets($output);
$output = $modx->rewriteUrls($output);
//end added by Dmi3yy
echo $output;
//tsv_minregjs();
?>

Пример #2
0
$modx->regClientCSS(TSVSHOP_SURL . "shop.css");
if ($act == "itemcard") {
    $modx->setPlaceholder('tsvoptions', $modx->runSnippet('TSVshop_options', array('docid' => $modx->documentIdentifier)));
    $modx->setPlaceholder('tsvservices', '<input type="hidden" name="formula" value="[*price*]" /><input type="hidden" name="cart_icon" value="[*cart_icon*]" /><script type="text/javascript">Ucalc("' . $modx->documentIdentifier . '")</script>');
    $modx->setPlaceholder('tsvprice', '<span id="price' . $modx->documentIdentifier . '">[*price*]</span>');
    $modx->setPlaceholder('tsvbattr', 'onkeypress="return testKey(event)" onChange="UserCalc(\'' . $modx->documentIdentifier . '\')"');
    $evt = $modx->invokeEvent("TSVshopOnViewItemCard", array("itemid" => $modx->documentIdentifier, "type" => $tsvshop['TypeCat']));
}
if ($act == "info") {
    print '<div id="infoblock_cont">' . tsv_display_infoblock($cache) . '</div>';
}
if ($act == "basket") {
    print '<div id="basket_cont">' . tsv_display_cart($cache, "basket") . '</div>';
}
if ($act == "checkout") {
    print '<div id="checkout_cont">' . tsv_display_cart($cache, "checkout") . '</div>';
}
if ($act == "finish") {
    print tsv_display_success($cache);
}
if ($a == "clear") {
    tsv_clear_cart();
}
if ($a == "del") {
    tsv_delete_item(_filter(intval($_GET['num'])));
}
if ($a == "add") {
    tsv_add_item($cache, $idnum, $name, $opt, $icon, $qty, $url, $typeitem);
}
if ($a == "chq") {
    tsv_modify_quantity(_filter(intval($_GET['num'])), _filter(floatval($_GET['qnt'])));