Example #1
0
  unset($_SESSION['new_user_session']);
  if($result){
      echo '1'.'~'.$company_id;
  }  else {
      echo '0';
  }
  
}


//Checout The Supply User from guest
if(isset($_POST['supply_usr_id']) && $_POST['supply_usr_id'] != '')
{
  
  $user_id      = $_POST['supply_usr_id'];
  $company_id   = COMPID($user_id);
  $staff_id     = $_POST['staff_id'];
  $reference    = $_POST['reference'];
  $company_name = $_POST['company_name'];
  $contact_name = $_POST['contact_name'];
  $phone        = $_POST['phone'];
  $email        = $_POST['email'];
  $add1         = $_POST['add1'];
  $add2         = $_POST['add2'];
  $city         = $_POST['city'];
  $state        = $_POST['state'];
  $zip          = $_POST['zip'];
  $cash_customer= $_POST['cash_customer'];
  $items_guest  = GuestItems($staff_id);
  foreach ($items_guest as $items){
            $unit_prc = ProdPriceForAdd($items['product_id']);
Example #2
0
     <input type="hidden" name="ref" id="ref" value="<?php echo $reference; ?>" />    
     <td width="200" align="left" valign="middle" class="brdr_2">Product Name</td>
   <td width="78" align="center" valign="middle" class="brdr_2">Unit Price</td>
   <td width="50" align="center" valign="middle" class="brdr_2">Qty</td>
   <td width="76" align="center" valign="middle" class="brdr_2">Line Price</td>
   <td width="229" align="left" valign="middle" class="brdr_2">Shipping Address</td>
   <td width="90" align="center" valign="middle" class="brdr_2">Option</td>
 </tr>      
     <?php
           $i = 1;
           if (count($checkout_product) > 0) {
               foreach ($checkout_product as $chk) {
                   $rowColor   = ($i % 2 != 0) ? '#ffeee1' : '#fff6f0';
                   $id         = $chk['id'];
                   $user_id    = $chk['user_id'];
                   $comp_id    = COMPID($user_id);
                   $super_id = getsuper($chk['product_id']);
                   $cat_id = getcat($chk['product_id']);
                   $sub_id = getsub($chk['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 != '')  ? '>>'.$sub_name_pre : $sub_name_pre;
                   $product_id = $chk['product_id'];
                   $_SESSION['product_id'] = $chk['product_id'];
                   $sku_id = getSku($chk['product_id']);
                   $product_name = getProName($chk['product_id']);
                   $tail         = $product_name;
                   $quantity = $chk['quantity'];
                   $unit_price = $chk['unit_price'];
Example #3
0
<?php
include './admin/config.php';

if (isset($_POST['fav_prod_id']) &&!empty($_POST['fav_prod_id'])) {
$fav_prod_id =  $_POST['fav_prod_id'];
$fav_cmp_id =   $_POST['fav_usr_id'];
$comp_id    =   COMPID($fav_cmp_id);
$check_fav  =   CHECKFAV($comp_id, $fav_prod_id);
if(count($check_fav) > 0){
$query = "DELETE FROM sohorepro_favorites WHERE comp_id = '".$comp_id."' AND product_id = '".$fav_prod_id."' ";
}  else {
    
    $sql_order_id = mysql_query("SELECT sort_id FROM sohorepro_favorites WHERE comp_id = '".$comp_id."' ORDER BY sort_id DESC LIMIT 1");
    $object_order = mysql_fetch_assoc($sql_order_id);

        if (count($object_order['sort_id']) > 0) {
            $order_id = ($object_order['sort_id'] + 1);
        } 
        else{
            $order_id = '0';
        }
       
        $spl_check_fav  =   checkSpecial($fav_cmp_id, $fav_prod_id);
        $spl_prod_fav   = editPdoructs($fav_prod_id);
        
        $list_price_fav = (count($spl_check_fav) > 0) ? $spl_check_fav[0]['sp_list_price'] : $spl_prod_fav[0]['list_price'];
        $disc_price_fav = (count($spl_check_fav) > 0) ? $spl_check_fav[0]['sp_discount'] : $spl_prod_fav[0]['discount'];
        $sell_price_fav = (count($spl_check_fav) > 0) ? $spl_check_fav[0]['sp_special_price'] : $spl_prod_fav[0]['price'];
        
$query = "INSERT INTO sohorepro_favorites
			SET     usr_id       = '" . $fav_cmp_id . "',