Пример #1
0
<?php

require "../init.php";
require "../includes/clientfunctions.php";
require "../includes/orderfunctions.php";
require "../includes/invoicefunctions.php";
require "../includes/configoptionsfunctions.php";
require "../includes/cartfunctions.php";
require "../includes/domainfunctions.php";
/*
*** USAGE SAMPLES ***
<script language="javascript" src="feeds/carttotal.php"></script>
*/
$currency = getCurrency();
$carttotals = calcCartTotals('', true);
$total = $carttotals['total'] ? $carttotals['total'] : formatCurrency(0);
widgetoutput($total);
function widgetoutput($value)
{
    echo "document.write('" . addslashes($value) . "');";
    exit;
}
Пример #2
0
$_SESSION['cart']['paymentmethod'] = $paymentmethod;
$_SESSION['cart']['promo'] = $promocode;
$_SESSION['cart']['notes'] = $notes;
if ($contactid) {
    $_SESSION['cart']['contact'] = $contactid;
}
if ($noinvoice) {
    $_SESSION['cart']['geninvoicedisabled'] = true;
}
if ($noinvoiceemail) {
    $CONFIG['NoInvoiceEmailOnOrder'] = true;
}
if ($noemail) {
    $_SESSION['cart']['orderconfdisabled'] = true;
}
$cartdata = calcCartTotals(true);
if ($affid && is_array($_SESSION['orderdetails']['Products']) && $_SESSION['uid'] != $affid) {
    foreach ($_SESSION['orderdetails']['Products'] as $productid) {
        insert_query("tblaffiliatesaccounts", array("affiliateid" => $affid, "relid" => $productid));
    }
}
$productids = $addonids = $domainids = "";
if (is_array($_SESSION['orderdetails']['Products'])) {
    $productids = implode(",", $_SESSION['orderdetails']['Products']);
}
if (is_array($_SESSION['orderdetails']['Addons'])) {
    $addonids = implode(",", $_SESSION['orderdetails']['Addons']);
}
if (is_array($_SESSION['orderdetails']['Domains'])) {
    $domainids = implode(",", $_SESSION['orderdetails']['Domains']);
}
Пример #3
0
         if ($ordervals['totalrecurringbiennially']) {
             echo "" . $ordervals['totalrecurringbiennially'] . " Biennially<br />";
         }
         if ($ordervals['totalrecurringtriennially']) {
             echo "" . $ordervals['totalrecurringtriennially'] . " Triennially<br />";
         }
         echo "</td></tr>";
     }
     echo "</table>\n</div>";
     exit;
 }
 $cartitems = count($_SESSION['cart']['products']) + count($_SESSION['cart']['addons']) + count($_SESSION['cart']['domains']) + count($_SESSION['cart']['renewals']);
 if (!$cartitems) {
     redir("noselections=1");
 }
 calcCartTotals(true);
 unset($_SESSION['uid']);
 if ($orderstatus == "Active") {
     update_query("tblorders", array("status" => "Active"), array("id" => $_SESSION['orderdetails']['OrderID']));
     if (is_array($_SESSION['orderdetails']['Products'])) {
         foreach ($_SESSION['orderdetails']['Products'] as $productid) {
             update_query("tblhosting", array("domainstatus" => "Active"), array("id" => $productid));
         }
     }
     if (is_array($_SESSION['orderdetails']['Domains'])) {
         foreach ($_SESSION['orderdetails']['Domains'] as $domainid) {
             update_query("tbldomains", array("status" => "Active"), array("id" => $domainid));
         }
     }
 }
 getUsersLang(0);
Пример #4
0
     if ($promoerrormessage) {
         $smartyvalues['errormessage'] = "<li>" . $promoerrormessage;
     }
     if ($paymentmethod) {
         $_SESSION['cart']['paymentmethod'] = $paymentmethod;
     }
     if ($notes) {
         $_SESSION['cart']['notes'] = $notes;
     }
     if ($firstname) {
         $_SESSION['cart']['user'] = array("firstname" => $firstname, "lastname" => $lastname, "companyname" => $companyname, "email" => $email, "address1" => $address1, "address2" => $address2, "city" => $city, "state" => $state, "postcode" => $postcode, "country" => $country, "phonenumber" => $phonenumber);
     }
 }
 $smartyvalues['promotioncode'] = $_SESSION['cart']['promo'];
 $ignorenoconfig = $cartsummary ? true : false;
 $carttotals = calcCartTotals("", $ignorenoconfig);
 $promotype = $carttotals['promotype'];
 $promovalue = $carttotals['promovalue'];
 $promorecurring = $carttotals['promorecurring'];
 $promodescription = $promotype == "Percentage" ? $promovalue . "%" : $promovalue;
 if ($promotype == "Price Override") {
     $promodescription .= " " . $_LANG['orderpromopriceoverride'];
 } else {
     if ($promotype == "Free Setup") {
         $promodescription = $_LANG['orderpromofreesetup'];
     }
 }
 $promodescription .= " " . $promorecurring . " " . $_LANG['orderdiscount'];
 $smartyvalues['promotiondescription'] = $promodescription;
 foreach ($carttotals as $k => $v) {
     $smartyvalues[$k] = $v;