' . zen_image_button('button_reset.gif', IMAGE_RESET) . ' ';
}
echo HEADING_TITLE_SEARCH_DETAIL . ' ' . zen_draw_input_field('search') . zen_hide_session_id();
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
$keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
echo ' ' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
}
echo '';
?>
|
|
get_allow_add_to_cart($products_filter) == 'Y') {
?>
Execute("select p.products_id,
f.featured_id, f.expires_date, f.featured_date_available, f.status
from " . TABLE_PRODUCTS . " p, " .
TABLE_FEATURED . " f
where p.products_id = f.products_id
and f.products_id = '" . $_GET['products_filter'] . "'");
if ($product->RecordCount() > 0) {
$fInfo = new objectInfo($product->fields);
}
// specials information
$product = $db->Execute("select p.products_id,
s.specials_id, s.specials_new_products_price, s.expires_date, s.specials_date_available, s.status
from " . TABLE_PRODUCTS . " p, " .
TABLE_SPECIALS . " s
where p.products_id = s.products_id
and s.products_id = '" . $_GET['products_filter'] . "'");
if ($product->RecordCount() > 0) {
$sInfo = new objectInfo($product->fields);
}
// products information
$product = $db->Execute("select p.products_id, p.products_model,
p.products_price, p.products_date_available,
p.products_tax_class_id,
p.products_quantity_order_min, products_quantity_order_units, p.products_quantity_order_max,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.products_priced_by_attribute, p.products_status,
p.products_discount_type, p.products_discount_type_from, p.products_price_sorter,
pd.products_name,
p.master_categories_id, p.products_mixed_discount_quantity
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_id = '" . $_GET['products_filter'] . "'
and p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'");
if ($product->RecordCount() > 0) {
$pInfo = new objectInfo($product->fields);
}
// set statuses
if (!isset($pInfo->products_status)) $pInfo->products_status = '1';
switch ($pInfo->products_status) {
case '0': $products_in_status = false; $products_out_status = true; break;
case '1':
default: $products_in_status = true; $products_out_status = false;
}
if (!isset($fInfo->status)) $fInfo->status = '1';
switch ($fInfo->status) {
case '0': $featured_in_status = false; $featured_out_status = true; break;
case '1':
default: $featured_in_status = true; $featured_out_status = false;
}
if (!isset($sInfo->status)) $sInfo->status = '1';
switch ($sInfo->status) {
case '0': $special_in_status = false; $special_out_status = true; break;
case '1':
default: $special_in_status = true; $special_out_status = false;
}
// Product is Priced by Attributes
if (!isset($pInfo->products_priced_by_attribute)) $pInfo->products_priced_by_attribute = '0';
switch ($pInfo->products_priced_by_attribute) {
case '0': $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true; break;
case '1': $is_products_priced_by_attribute = true; $not_products_priced_by_attribute = false; break;
default: $is_products_priced_by_attribute = false; $not_products_priced_by_attribute = true;
}
// Product is Free
if (!isset($pInfo->product_is_free)) $pInfo->product_is_free = '0';
switch ($pInfo->product_is_free) {
case '0': $in_product_is_free = false; $out_product_is_free = true; break;
case '1': $in_product_is_free = true; $out_product_is_free = false; break;
default: $in_product_is_free = false; $out_product_is_free = true;
}
// Product is Call for price
if (!isset($pInfo->product_is_call)) $pInfo->product_is_call = '0';
switch ($pInfo->product_is_call) {
case '0': $in_product_is_call = false; $out_product_is_call = true; break;
case '1': $in_product_is_call = true; $out_product_is_call = false; break;
default: $in_product_is_call = false; $out_product_is_call = true;
}
// Products can be purchased with mixed attributes retail
if (!isset($pInfo->products_quantity_mixed)) $pInfo->products_quantity_mixed = '0';
switch ($pInfo->products_quantity_mixed) {
case '0': $in_products_quantity_mixed = false; $out_products_quantity_mixed = true; break;
case '1': $in_products_quantity_mixed = true; $out_products_quantity_mixed = false; break;
default: $in_products_quantity_mixed = true; $out_products_quantity_mixed = false;
}
// Products can be purchased with mixed attributes for discount
if (!isset($pInfo->products_mixed_discount_quantity)) $pInfo->products_mixed_discount_quantity = '1';
switch ($pInfo->products_mixed_discount_quantity) {
case '0': $in_products_mixed_discount_quantity = false; $out_products_mixed_discount_quantity = true; break;
case '1': $in_products_mixed_discount_quantity = true; $out_products_mixed_discount_quantity = false; break;
default: $in_products_mixed_discount_quantity = true; $out_products_mixed_discount_quantity = false;
}
// Product is product discount type - None, Percentage, Actual Price, $$ off
$discount_type_array = array(array('id' => '0', 'text' => DISCOUNT_TYPE_DROPDOWN_0),
array('id' => '1', 'text' => DISCOUNT_TYPE_DROPDOWN_1),
array('id' => '2', 'text' => DISCOUNT_TYPE_DROPDOWN_2),
array('id' => '3', 'text' => DISCOUNT_TYPE_DROPDOWN_3));
// Product is product discount type from price or special
$discount_type_from_array = array(array('id' => '0', 'text' => DISCOUNT_TYPE_FROM_DROPDOWN_0),
array('id' => '1', 'text' => DISCOUNT_TYPE_FROM_DROPDOWN_1));
// tax class id
$tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE));
$tax_class = $db->Execute("select tax_class_id, tax_class_title
from " . TABLE_TAX_CLASS . " order by tax_class_title");
while (!$tax_class->EOF) {
$tax_class_array[] = array('id' => $tax_class->fields['tax_class_id'],
'text' => $tax_class->fields['tax_class_title']);
$tax_class->MoveNext();
}
?>
products_id != '') { ?>
products_id != '') { ?>
products_id != '') { ?>
master_categories_id != zen_get_products_category_id($products_filter)) {
$sql = "update " . TABLE_PRODUCTS . " set master_categories_id='" . zen_get_products_category_id($products_filter) . "' where products_id='" . $products_filter . "'";
$db->Execute($sql);
$pInfo->master_categories_id = zen_get_products_category_id($products_filter);
}
?>
products_id != '') {
?>
|
products_id . ' ' . $pInfo->products_name; ?> products_model; ?> |
|
|