Exemplo n.º 1
0
     <?php
           $i = 1;
           if (count($checkout_product) > 0) {
               foreach ($checkout_product as $chk) {
                   $rowColor = ($i % 2 != 0) ? '#ffeee1' : '#fff6f0';
                   $id       = $chk['id'];
                   $super_id = getsuper($chk['product_id']);
                   $cat_id = getcat($chk['product_id']);
                   $sub_id = getsub($chk['product_id']);
                   $super_name = getsuperN($super_id);
                   $cat_name = getcatN($cat_id);
                   $sub_name = getsubN($sub_id);
                   $product_id = $chk['product_id'];
                   $_SESSION['product_id'] = $chk['product_id'];
                   $sku_id = getSku($chk['product_id']);
                   $product_name = getProName($chk['product_id']);
                   $quantity = $chk['quantity'];
                   $unit_price = $chk['unit_price'];
                   $price = getPriceCkt($user_id);
                   $tax_status = getTaxStatusChk($user_id);
                   if($tax_status == '1')
                   {
                   $tax_line = '8.875';    
                   }  else {
                   $tax_line = '0';       
                   }
                   $tax         = ($tax_line * ($price[0]['sub_total']/100));
                   $grand_tot   = ($price[0]['sub_total'] + $tax); 
                   ?>
 <tr bgcolor="<?php echo $rowColor; ?>">
   <span class="user_id" id="<?php echo $user_id; ?>" style="display: none;"></span>
Exemplo n.º 2
0
$user_id          =       $_POST['user_cart_id'];
$company_id       =       $_POST['company_id'];
$referece         =       $_POST['reference']  ;
$sql = "INSERT INTO sohorepro_order_master SET order_number = '".$order_id."', order_id     = '" . $referece . "', customer_company = '".$company_id."', customer_name = '".$user_id."', created_date = now()";
mysql_query($sql);
$order_id_pro = mysql_insert_id();
$product = checkOut($user_id);

if($order_id_pro != ''){
foreach ($product as $pro)
    {
    $product_id       = $pro['product_id'];
    $product_price    = $pro['unit_price'];
    $product_quantity = $pro['quantity'];
    $shipping_id      = $pro['shipping_add_id'];
    $product_name     = mysql_real_escape_string(getProName($product_id));
    $query = "INSERT INTO sohorepro_product_master SET product_id     = '" . $product_id . "', product_price = '" . $product_price . "', product_quantity = '" . $product_quantity . "', product_name = '".$product_name."', order_id = '" .$order_id_pro. "', shipping_add_id ='" .$shipping_id. "' ";
    mysql_query($query);
    } 
}


//Order to Email
$sql_order_id_mail      = mysql_query("SELECT id,order_id,created_date,order_number FROM sohorepro_order_master ORDER BY id DESC LIMIT 1");
$object                 = mysql_fetch_assoc($sql_order_id_mail);
$user_mail              = UserMail($user_id);
$id                     = $object['id'];
$Order_id               = $object['order_id'];
$Order_number           = $object['order_number'];
$Date                   = date("m-d-Y h:m:s", strtotime($object['created_date']));                            
$view_orders            = viewOrders($id);
Exemplo n.º 3
0
            <input type="hidden" name="edi_mail_id" id="edi_mail_id" value="<?php 
echo $editMail[0]['id'];
?>
" />     
            <div style="float: left;width: 100%;text-align: right;padding-bottom: 10px;"><input type="submit" name="Delete" value="REMOVE" style="background: #00979D;color: #FFF;padding: 5px 10px;border-radius: 7px;font-weight: bold;cursor: pointer;" /></div>
            <table align="left" width="100%">
                <tr bgcolor="#ff7e00">
                    <td>Product Name</td>
                    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                </tr>
                <?php 
$i = 1;
foreach ($editfav as $fav) {
    $rowColor = $i % 2 != 0 ? '#ffeee1' : '#fff6f0';
    $id = $fav['id'];
    $product_name = getProName($fav['product_id']);
    $super_id = getsuper($fav['product_id']);
    $cat_id = getcat($fav['product_id']);
    $sub_id = getsub($fav['product_id']);
    $super_name = getsuperN($super_id) != '' ? getsuperN($super_id) : '';
    $cat_name_pre = getcatN($cat_id) != '' ? getcatN($cat_id) : '';
    $cat_name = $cat_name_pre != '' ? '>>' . $cat_name_pre : $cat_name_pre;
    $sub_name_pre = getsubN($sub_id) != '' ? getsubN($sub_id) : '';
    $sub_name = $sub_name_pre != '' ? '>>' . $sub_name_pre : $sub_name_pre;
    ?>
                <tr bgcolor="<?php 
    echo $rowColor;
    ?>
">
                    <td align="left" valign="middle" class="brdr_1" style="font-size: 15px;">
                        <?php 
Exemplo n.º 4
0
function lib_getorderlist(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|5,flag|all,limit|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    //获取全部订单
    if ($flag == 'all') {
        $where = '';
    } else {
        if ($flag == 'line') {
            $where = 'where typeid = 1';
        } else {
            if ($flag == 'hotel') {
                $where = 'where typeid = 2';
            } else {
                if ($flag == 'car') {
                    $where = 'where typeid = 3';
                } else {
                    if ($flag == 'spot') {
                        $where = 'where typeid = 5';
                    } else {
                        if ($flag == 'visa') {
                            $where = 'where typeid = 8';
                        } else {
                            if ($flag == 'tuan') {
                                $where = 'where typeid = 13';
                            }
                        }
                    }
                }
            }
        }
    }
    $sql = "select * from #@__member_order {$where} order by addtime desc limit {$limit},{$row}";
    $innertext = trim($ctag->GetInnertext());
    $dsql->SetQuery($sql);
    $dsql->Execute();
    $ctp = new STTagParse();
    $ctp->SetNameSpace("field", "[", "]");
    $ctp->LoadSource($innertext);
    $GLOBALS['autoindex'] = 0;
    $revalue = '';
    while ($row = $dsql->GetArray()) {
        $GLOBALS['autoindex']++;
        $row['nickname'] = getNickName($row['memberid']);
        //昵称
        $row['dingtime'] = Helper_Archive::formatAddTime($row['addtime']);
        //预订时间
        $row['productname'] = getProName($row['productautoid'], $row['typeid'], $row['productname']);
        foreach ($ctp->CTags as $tagid => $ctag) {
            if ($ctag->GetName() == 'array') {
                $ctp->Assign($tagid, $row);
            } else {
                if (!empty($row[$ctag->GetName()])) {
                    $ctp->Assign($tagid, $row[$ctag->GetName()]);
                }
            }
        }
        $revalue .= $ctp->GetResult();
    }
    return $revalue;
}