$user_address2 = $Prod['comp_business_address2']; $user_address3 = $Prod['comp_business_address3']; $company_phone = $Prod['comp_contact_phone']; $company_fax = $Prod['comp_contact_fax']; $company_city = $Prod['comp_city']; $state_abbr = $Prod['comp_state']; $company_zip = $Prod['comp_zipcode']; $tax = $Prod['tax_exe'] == 1 ? 'Yes' : 'No'; $tax_excempt_number = $Prod['tax_exempt_number']; $status = $Prod['status'] == 1 ? 'active' : 'de-active'; if ($_SESSION['admin_user_type'] == '2' && $Prod['status'] == 1) { $staff_prev = ''; } else { $staff_prev = 'status'; } $deleivery_address = ShippingAddressAll($cumpony_id); ?> <tr class="trigger" id="<?php echo $id; ?> "> <td width="49" align="center" valign="middle" bgcolor="<?php echo $rowColor; ?> " class="pad_btm"><?php echo $i; ?> </td> <td width="100" align="center" valign="middle" bgcolor="<?php echo $rowColor1;
foreach ($items_guest as $items){ $unit_prc = ProdPriceForAdd($items['product_id']); $exist_product = ExistProdInChe($items['product_id'], $user_id); $added_qty = $exist_product[0]['quantity'] + $items['quantity']; if (count($exist_product) > 0) { $query = "UPDATE sohorepro_checkout SET quantity = '".$added_qty."' WHERE product_id = '".$items['product_id']."' AND user_id = '".$user_id."' "; } else { $query = "INSERT INTO sohorepro_checkout SET product_id = '" . $items['product_id'] . "', quantity = '" . $items['quantity'] . "', unit_price = '" . $items['unit_price'] . "', user_id = '" . $user_id . "', staff_id = '0', company_id = '" . $company_id . "', reference = '" . $job_reference . "', shipping_add_id = '0' "; } mysql_query($query); } $query_guest = "DELETE FROM sohorepro_checkout_guest WHERE ip = '".$ip."' "; mysql_query($query_guest); } $shipping_address = ($company_id != '') ? ShippingAddressAll($company_id): ShipAddNewSup($user_id) ; $shipping_size = count($shipping_address); $primary_shipping = PrimaryShipping($company_id); $comp_name = companyName($company_id); $address_shipp = ($shipping_size == 1) ? $shipping_address[0]['id'] : '0' ; $checkout_product = checkOut($user_id); $_SESSION['ref_val'] = $checkout_product[0]['reference']; $reference = ($checkout_product[0]['reference'] != '') ? $checkout_product[0]['reference'] : $_SESSION['ref_val']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <!-- Mirrored from buckart.com/srsite/SoHoRepro-WebsitePages/store/store.html by HTTrack Website Copier/3.x [XR&CO'2013], Sat, 21 Sep 2013 08:44:50 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack --> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<?php include './admin/config.php'; include './admin/db_connection.php'; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $job_reference = $_REQUEST['jobref']; $user_id = $_SESSION['sohorepro_userid']; $company_id = $_SESSION['sohorepro_companyid']; $shipping_address = ShippingAddressAll($company_id); $shipping_size = count($shipping_address); $primary_shipping = PrimaryShipping($company_id); $comp_name = companyName($company_id); $address_shipp = ($shipping_size == 1) ? $shipping_address[0]['id'] : '0' ; if ($_REQUEST['order_val'] == '1') { //$sql = "DELETE FROM sohorepro_checkout WHERE user_id = " . $user_id . " "; //mysql_query($sql); for ($i = 0; $i < count($_REQUEST['product_id']); $i++) { if ($_REQUEST['quantity'][$i] != '') { $chk_pid = checkPid($_REQUEST['product_id'][$i], $user_id); if (count($chk_pid) < 1) { $query = "INSERT INTO sohorepro_checkout SET product_id = '" . $_REQUEST['product_id'][$i] . "', quantity = '" . $_REQUEST['quantity'][$i] . "', unit_price = '" . $_REQUEST['price'][$i] . "', user_id = '" . $user_id . "', company_id = '" . $company_id . "', reference = '" . $job_reference . "', shipping_add_id = '" . $address_shipp . "' "; mysql_query($query); } } } } ?>