Exemple #1
0
}
$xoopsTpl->assign('op', $op);
$xoopsTpl->assign('mod_pref', $mod_pref);
$cartForTemplate = array();
$emptyCart = false;
$shippingAmount = $commandAmount = $vatAmount = $commandAmountTTC = $discountsCount = $commandAmountVAT = 0;
$goOn = '';
$discountsDescription = array();
function listCart()
{
    global $cartForTemplate, $emptyCart, $shippingAmount, $commandAmount, $vatAmount, $goOn, $commandAmountTTC, $discountsDescription;
    $reductions = new oledrion_reductions();
    $reductions->computeCart($cartForTemplate, $emptyCart, $shippingAmount, $commandAmount, $vatAmount, $goOn, $commandAmountTTC, $discountsDescription, $discountsCount);
}
$oledrion_Currency = oledrion_Currency::getInstance();
$countries = oledrion_utils::getCountriesList();
switch ($op) {
    case 'save':
        if (empty($_POST)) {
            oledrion_utils::redirect(_OLEDRION_ERROR20, OLEDRION_URL, 4);
        }
        if ($h_oledrion_caddy->isCartEmpty()) {
            oledrion_utils::redirect(_OLEDRION_CART_IS_EMPTY, OLEDRION_URL, 4);
        }
        listCart();
        switch ($action) {
            case 'make':
                $commandAmountTTC = $commandAmountTTC + $commandAmountVAT;
                $password = md5(xoops_makepass());
                $passwordCancel = md5(xoops_makepass());
                $commande = $h_oledrion_commands->create(true);