'The Promo Code you have entered has expired.', 2 => 'The Promo Code you have entered is no longer valid.', 3 => 'You have not added the required minimum amount to use this promotion.', 4 => 'You have not added the required item to use this promotion.'); if ($_SESSION['order_processed'] == 'Y') { $_SESSION['cart'] = array(); unset($_SESSION['email']); unset($_SESSION['login_option']); unset($_SESSION['first_name']); unset($_SESSION['last_name']); unset($_SESSION['address1']); unset($_SESSION['address2']); unset($_SESSION['address3']); unset($_SESSION['address4']); unset($_SESSION['city']); unset($_SESSION['state']); unset($_SESSION['zipcode']); unset($_SESSION['day_phone']); unset($_SESSION['eve_phone']); unset($_SESSION['country_id']); unset($_SESSION['post_step3_flag']); unset($_SESSION['payment_option']); unset($_SESSION['organization']); unset($_SESSION['dropship_flag']); unset($_SESSION['cc_name']); unset($_SESSION['cc_address1']); unset($_SESSION['cc_address2']); unset($_SESSION['cc_address3']); unset($_SESSION['cc_city']); unset($_SESSION['cc_state']); unset($_SESSION['cc_zip']); unset($_SESSION['cc_type_id']); unset($_SESSION['cc_exp_date']); unset($_SESSION['cc_number']); unset($_SESSION['order_contact_name']); unset($_SESSION['ar_contact_name']); unset($_SESSION['ar_contact_email']); unset($_SESSION['pre_approved']); unset($_SESSION['order_contact_phone']); unset($_SESSION['ar_contact_phone']); unset($_SESSION['ar_contact_fax']); unset($_SESSION['po_comments']); unset($_SESSION['comments']); unset($_SESSION['po_number']); unset($_SESSION['cc_bank_phone_number']); unset($_SESSION['order_processed']); unset($_SESSION['promo_row']); } if (is_numeric($_GET['addtocart'])) { add_to_cart($_GET['addtocart'], 1); header('Location: ' . $_SERVER['PHP_SELF']); exit; } elseif ($_POST['task'] == "add") { $found_product_to_add = 0; foreach ($_POST as $key => $value) { if (preg_match("/^add_to_cart_(\d+)$/", $key, $matches) && is_numeric($value) && $value > 0) { $product_id = $matches[1]; add_to_cart($product_id, $value); $found_product_to_add = 1; } } if (!$found_product_to_add && !empty($_POST['default_product_id'])) { add_to_cart($_POST['default_product_id'], 1); } header('Location: ' . $_SERVER['PHP_SELF']); exit; } elseif ($_POST['task'] == 'add_price_match') { foreach ($_POST as $key => $value) { if (preg_match("/^add_to_cart_(\d+)$/", $key, $matches) && is_numeric($value) && $value > 0) { $product_id = $matches[1]; if (!empty($_POST['price_match_price_' . $product_id]) && !empty($_POST['price_match_store']) && !empty($_POST['price_match_website'])) { add_to_cart($product_id, $value, $_POST['price_match_price_' . $product_id], clean_input($_POST['price_match_store']), clean_input($_POST['price_match_website'])); } } } header('Location: ' . $_SERVER['PHP_SELF']); exit; } elseif ($_POST['task'] == 'add_donation') { foreach ($_POST as $key => $value) { if (preg_match("/^add_to_cart_(\d+)$/", $key, $matches)) { $product_id = $matches[1]; $other_donation_amount = $_POST['add_to_cart_other_' . $product_id]; if (empty($other_donation_amount) && !empty($value) && is_numeric($value)) { add_to_cart($product_id, 1, '', '', '', $value); } } elseif (preg_match("/^add_to_cart_other_(\d+)$/", $key, $matches)) { $product_id = $matches[1]; $other_donation_amount = $_POST['add_to_cart_other_' . $product_id]; if (!empty($other_donation_amount) && !empty($other_donation_amount) && is_numeric($other_donation_amount)) { add_to_cart($product_id, 1, '', '', '', $other_donation_amount); } } } header('Location: /cart_step1_review.html'); exit; } elseif ($_POST['task'] == "update" || $_POST['task'] == "checkout" || $_POST['task'] == "keep_shopping") { foreach ($_SESSION['cart'] as $key => $value) { if ($_POST["delete_product_" . $key] == 'Y' || $_POST["product_quantity_" . $key] == 0) { remove_from_cart($key); } else { update_cart($key, $_POST["product_quantity_" . $key]); $total_weight += ($_POST["product_quantity_" . $key] * $value["weight"]); } } $zipcode = trim($_POST["zipcode"]); $zipcode = preg_replace("/\s+/", "", $zipcode); $_SESSION['zipcode'] = $zipcode; $_SESSION['ship_method'] = $_POST['ship_method']; $_SESSION['country_id'] = $_POST['country_id']; if (!empty($_POST['promotion_code'])) { unset($promo_row); unset($_SESSION['promo_row']); $show_promo_error = 0; $sql = "select * from promotion where "; $sql .= "upper(code)=" . strnull(strtoupper(clean_input($_POST['promotion_code']))) . " and enabled_flag='Y' "; $sql .= "and (start_date <= now() or start_date is null) "; $sql .= "and (end_date >= now() or end_date is null)"; $res = mysql_query($sql); $promo_row = mysql_fetch_assoc($res); if (!empty($promo_row)) { if (!empty($promo_row['max_orders'])) { $sql = "select count(1) as count from ws_order "; $sql .= "where enabled_flag='Y' and promotion_id=" . $promo_row['promotion_id']; $res = mysql_query($sql); $count_row = mysql_fetch_assoc($res); if ($count_row['count'] >= $promo_row['max_orders']) { $show_promo_error = 2; } } if (!empty($promo_row['min_order_amount']) && $show_promo_error == 0) { $cart_subtotal = get_cart_subtotal(); if ($cart_subtotal < $promo_row['min_order_amount']) { $show_promo_error = 3; } } if (!empty($promo_row['required_product_id']) && $show_promo_error == 0) { if (!in_array($promo_row['required_product_id'], array_keys($_SESSION['cart']))) { $show_promo_error = 4; } } } else { $show_promo_error = 1; } if ($show_promo_error == 0) { $_SESSION['promo_row'] = $promo_row; } } if ($_POST['task'] == 'update') { header('Location: ' . $_SERVER['PHP_SELF'] . (($show_promo_error) ? '?show_promo_error=' . $show_promo_error : '')); exit; } } // $_SESSION['tax_percent'] = 0; unset($_SESSION['tax_percent']); unset($_SESSION['shipping_total']); if (!empty($_SESSION['country_id'])) { $sql = "select c.*,pv.short_name as type_short_name from country c, profile_value pv where "; $sql .= "c.country_type_id=pv.profile_value_id and c.country_id=" . $_SESSION['country_id']; $res = mysql_query($sql); $country_row = mysql_fetch_assoc($res); if (($country_row['type_short_name'] == 'international' || !empty($_SESSION['zipcode'])) && !empty($_SESSION['ship_method'])) { unset($_SESSION['ups_error']); unset($_SESSION['shipping_info']); $shipping_info = calculate_shipping($country_row['country'], $country_row['country_code'], $_SESSION['zipcode'], $_SESSION['ship_method'], $country_row['type_short_name'], $country_row['usps_country']); $_SESSION['shipping_total'] = $shipping_info['total_cost']; $_SESSION['shipping_info'] = $shipping_info; } } if (!is_numeric($_SESSION['zipcode'])) { $temp = split("-", $_SESSION['zipcode']); if (is_numeric($temp[0])) { $use_zip = $temp[0]; } } else { $use_zip = $_SESSION['zipcode']; } if (!empty($use_zip)) { unset($tax_row); $sql = "select * from zip_code_tax where starting_zip_code <= $use_zip && ending_zip_code >= $use_zip"; $res = mysql_query($sql); $tax_row = mysql_fetch_assoc($res); if (!empty($tax_row)) { $_SESSION['tax_percent'] = $tax_row["tax_amount"]; } } if ($_POST['task'] == "checkout") { if (empty($_SESSION['cart'])) { header("Location: /cart.html"); exit; } else { if ($_POST['return_final']) { header("Location: http" . (preg_match("/^dev/", $_SERVER['SERVER_NAME']) ? '' : 's') . "://" . $_SERVER['SERVER_NAME'] . "/cart_step5_final_review.html"); exit; } else { header("Location: /cart_donation.html"); exit; } } } elseif ($_POST['task'] == "keep_shopping") { if (empty($_SESSION['last_category'])) { header("Location: /index.html"); exit; } elseif ($_SESSION['last_category'] == 'new_items') { header("Location: /new/"); exit; } elseif ($_SESSION['last_category'] == 'sale_items') { header("Location: /sale/"); exit; } else { header("Location: /store/" . urlencode($_SESSION['last_category'])); exit; } } elseif ($_POST['task'] == 'change_shipping') { if ($_POST['change_ship_method'] != $_SESSION['ship_method']) { $_SESSION['ship_method'] = $_POST['change_ship_method']; $sql = "select c.*,pv.short_name as type_short_name from country c, profile_value pv where "; $sql .= "c.country_type_id=pv.profile_value_id and c.country_id=" . $_SESSION['country_id']; $res = mysql_query($sql); $country_row = mysql_fetch_assoc($res); unset($_SESSION['ups_error']); unset($_SESSION['shipping_info']); $shipping_info = calculate_shipping($country_row['country'], $country_row['country_code'], $_SESSION['zipcode'], $_SESSION['ship_method'], $country_row['type_short_name'], $country_row['usps_country']); $_SESSION['shipping_total'] = $shipping_info['total_cost']; $_SESSION['shipping_info'] = $shipping_info; } header('Location: ' . $_SERVER['PHP_SELF']); exit; } if (!empty($_SESSION['ship_method'])) { $ship_method_options_hash = get_ship_method_options($country_row['country'], $country_row['country_code'], $country_row['type_short_name'], $_SESSION['zipcode'], $country_row['usps_country']); } $_SESSION['member_level_hash'] = array(); if (!empty($_SESSION['auth_row'])) { $total_elligible = get_total_elligibile($_SESSION['auth_row']['user_id']); } ?> <? echo $_SESSION['config_hash']['ws_html_title']; ?>

SHOPPING CART

View Cart > Humanitarian Donation > Review Order > Login > Shipping Info > Billing Info > Final Review > Order Complete
">
' : ''; ?> $value) { $price = get_price($key); if ($price > $intHighestPrice) { $intHighestPrice = $price; $product_compare_id = $key; } if ($item_count > 0) { ?> $first_subtotal) { $total_discount = $first_subtotal; } $temp_subtotal = $first_subtotal + ($total_discount * -1); $member_discount_amount = 0; if (!empty($_SESSION['auth_row'])) { $total_elligible += $temp_subtotal; $_SESSION['member_level_hash'] = get_member_level($total_elligible); } if (!empty($_SESSION['member_level_hash']['discount_percent'])) { $member_discount_amount = round((($_SESSION['member_level_hash']['discount_percent'] / 100) * ($first_subtotal - $_SESSION['promo_row']['flat_discount'])) * -1, 2); $total_discount += ($member_discount_amount * -1); } if ($total_discount > $first_subtotal) { $total_discount = $first_subtotal; } $tax_subtotal = $first_subtotal + ($total_discount * -1); $tax = round(($tax_subtotal * $_SESSION['tax_percent']) / 100, 2); if ($_SESSION['promo_row']['free_shipping_flag'] == 'Y' && $_SESSION['ship_method'] == 'UPS Ground') { $total_discount += $_SESSION['shipping_total']; $free_shipping_amount = $_SESSION['shipping_total'] * -1; } $total_discount = $total_discount * -1; $subtotal = $first_subtotal + $total_discount; } if (empty($_SESSION['cart'])) { ?> "'.date('Y-m-d').'" order by date asc'; $date = mysql_fetch_assoc(mysql_query($query)); if($date): ?> 0) { $sql .= "and p.product_id not in (" . join(",", $random_product_ids) . ") "; } $sql .= "and p.default_content_product_id=0 and p.availability_id=pv.profile_value_id and "; $sql .= "pv.short_name = 'in_stock' and p.product_id != " . $product_row['product_id'] . " order by rand() limit 0,1"; $res = mysql_query($sql); $temp_prod_row = mysql_fetch_assoc($res); $show_product_id = $temp_prod_row["product_id"]; } if (!empty($show_product_id)) { $blnAreRelatedItems = true; $temp_prod_row = get_one_row($show_product_id, "product_id", "product"); array_push($random_product_ids, $temp_prod_row["product_id"]); $product_type_row = get_product_type($show_product_id); $item_url = '/item/' . $temp_prod_row["url_name"]; $image_url = (file_exists($_SERVER['DOCUMENT_ROOT'] . '/images/products/' . get_image_name($temp_prod_row["product_id"]))) ? '/images/products/' . get_image_name($temp_prod_row["product_id"]) : '/images/no_image.gif'; $price_hash = array(); $sql = "select * from product_price where product_id=" . $temp_prod_row["product_id"]; $sql .= " order by min_quantity"; $res2 = mysql_query($sql); while ($price_row = mysql_fetch_assoc($res2)) { $price_hash[$price_row["min_quantity"]] = $price_row["price"]; } mysql_free_result($res2); if ($i == 1) { ?>
REMOVE ITEM DESCRIPTION QTY PRICE TOTAL
(BACKORDER)' : ''; ?>(PRICEMATCH)' : ''; ?> (Ordered ' . $value['member_history_quantity'] . ' in last ' . $_SESSION['config_hash']['reseller_days'] . ' days)'; } ?> " size="4" onBlur="checkField(this, 'Integer');">


Your shopping cart is currently empty.

If you are trying to place an order but cannot add items to your cart,
please call us toll-free at and place your order over the phone!

  SUBTOTAL:  
MEMBER DISCOUNT:   - %:  
' . $promotion_error_codes[$_GET['show_promo_error']] . '  '; } ?> PROMO CODE:    DISCOUNT:
( off)
(% off)


 
COUNTRY:   ZIP:    TAX:  
SHIPPING METHOD:    SHIPPING:
(free shipping)

 
Next available shipping date from DjembeDirect.com warehouse:
      TOTAL:  
  
 
*The shipping method you have selected is not available for your order. Please contact if you have questions.
 
(Not quite ready to order? Click here to save these items to a wishlist!) (Not quite ready to order? Click here to save these items to a wishlist!)
 
WE ALSO RECOMMEND THESE PRODUCTS:
$

 
$data) { ?>
WHAT ARE MY OTHER SHIPPING OPTIONS?:
SHIPPING SERVICE COST TIME DETAILS
>