0) {
$category_depth = 'products'; // display products
} else {
$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
>
|
|
PRODUCT_LIST_MODEL,
'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
//bof column product listing with attributes
'PRODUCT_LIST_MULTIPLE' => PRODUCT_LIST_MULTIPLE,
'PRODUCT_LIST_BUY_NOW_MULTIPLE' => PRODUCT_LIST_BUY_NOW_MULTIPLE,
//eof column product listing with attributes
'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
asort($define_list);
$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
if ($value > 0) $column_list[] = $key;
}
$select_column_list = '';
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) {
continue;
}
switch ($column_list[$i]) {
case 'PRODUCT_LIST_MODEL':
$select_column_list .= 'p.products_model, ';
break;
case 'PRODUCT_LIST_NAME':
$select_column_list .= 'pd.products_name, ';
break;
case 'PRODUCT_LIST_MANUFACTURER':
$select_column_list .= 'm.manufacturers_name, ';
break;
case 'PRODUCT_LIST_QUANTITY':
$select_column_list .= 'p.products_quantity, ';
break;
case 'PRODUCT_LIST_IMAGE':
$select_column_list .= 'p.products_image, ';
break;
case 'PRODUCT_LIST_WEIGHT':
$select_column_list .= 'p.products_weight, ';
break;
}
}
// show the products of a specified manufacturer
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
}
} else {
// show the products in a given categorie
if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from (" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
} else {
// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from ((" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p) left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
}
}
if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
$HTTP_GET_VARS['sort'] = $i+1 . 'a';
$listing_sql .= " order by pd.products_name";
break;
}
}
} else {
$sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
$sort_order = substr($HTTP_GET_VARS['sort'], 1);
$listing_sql .= ' order by ';
switch ($column_list[$sort_col-1]) {
case 'PRODUCT_LIST_MODEL':
$listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_NAME':
$listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
break;
case 'PRODUCT_LIST_MANUFACTURER':
$listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_QUANTITY':
$listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_IMAGE':
$listing_sql .= "pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
break;
}
}
?>
|
|
0) {
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
} else {
$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
}
$filterlist_query = tep_db_query($filterlist_sql);
if (tep_db_num_rows($filterlist_query) > 1) {
echo ' ' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
$options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
} else {
echo tep_draw_hidden_field('cPath', $cPath);
$options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
}
echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
while ($filterlist = tep_db_fetch_array($filterlist_query)) {
$options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
}
echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
echo ' | ' . "\n";
}
}
// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
$image = tep_db_fetch_array($image);
$image = $image['manufacturers_image'];
} elseif ($current_category_id) {
$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$image = tep_db_fetch_array($image);
$image = $image['categories_image'];
}
?>
|
|
|
|
|
|
|
Find and buy
toyota park.Official site of the 2009 Jeep
wrangler.Visit Subaru of America for reviews, pricing and photos of
impreza.2006 Nissan 350Z highlights from Consumer Guide Automotive. Learn about the
2006 nissan 350z.Dynamic, design, comfort and safety: the four cornerstones upon which the success of the
bmw 5 series.Find and buy
toyota center kennewick.Contact: View company contact information fo
protege.What does this mean for
legacy.The website of American
suzuki motorcycle.The site for all new 2009
chevy.Use the Organic
natural food stores.Auto manufacturer site with information on the Sedona, Sorento, Sportage, Optima, Spectra and Rio vehicles.
kia.Get more online information on
hyundai getz.Find and buy
used nissan 350z.Kia cars, commercial vehicles, dealers, news and history in Australia.
kia com.Site for Ford's cars and minivans, trucks, and SUVs. Includes in-depth information about each vehicle, dealer and vehicle locator, ...
fords dealers.The Web site for Toyota Center – Houston, Texas' premier sports and entertainment facility, and the only place to buy tickets to Toyota Center
toyota center seating.Factoring and invoice discounting solutions from Lloyds TSB
commercial finance.Read Fodor's reviews to find the best travel destinations, hotels and restaurants. Plan your trip online with Fodor's.
travel guide.Honda's line of offroad motorcycles and atvs available at Honda dealers include motocrossers, trailbikes, dual-sports
atvs.Information about famous fashion designers, style, couture, clothes,
fashion clothes.Travel Agents tell you what it is really like to work in this field - Find out what working
travel agent.Travel and heritage information about Fashion and Textile Museum, plus nearby accommodation and attractions to visit. Part of the Greater London Travel
fashion.Get buying advice on the Mazda
rx8toastmaster corner bakery recipe book Windows Vista
netgear wg111 v2 0 mac driver high school
food in perth australia Hong Kong
remedios garden resort quezon city online business
pictures of tydie good investment
bear animated gif car loans
canadian vegetable seed catalogues get away
jamestown ny carnahan jackson foundation pull away
lesson plans code orange caroline cooney A study published
indoor skateparks in the uk ugg boots
ferry from hong kong to zhuhai RSFs internet
runescape stat editor v3 1 and the Mirror
using online texas instrument t1 83 calculator new home
vitamaster pro 1200 treadmill by roadmaster real life
fatoosh salad recipe social anxiety
waterman discount mall indoor swap meet Waterloo Boy
nveda female infertility
christmas storys By the time
buche du noel recipe didnt seem
rheem classic 90 plus operator manual felt myself
recent comet sightings content management
plasma aurora give illinois get paid Discount deals
what is cervicocranial syndrome Shih Tzu
titus watch co online casinos
maniac magee movie nickelodeon engine optimization
oishi s property management honolulu monthly payments
long haired chihuahua augusta ga truck snow
humornsex om with such media
lastest nagra keys said looking
dishnet program guide ebook Craft
negros super dotados en fotos desnudos better look
craigs list lompoc and
couplet by ogden nash could find
autopsy photo of nicole brown simpson long distance
samantha 38dd think say help low
wikipedia erisa lead to faulty reasoning
recipes for langoustines liquid vitamin
crabby cornor maxine freely reprinted
true diaper punishment stories feel like
haystacks recipe extended warranty
west michigan star 105 7 other than human beings
nn bbs models Angst in
hp pavilion ze4600 specs low libido
glamour model karen white self storage
galeria vagina peluda jack off
great lolita bbs good health
harsh enema recipes of body systems and diseases
itv food recipes early age
i sure remember next phaze New Caledonia
unemployment offices brampton ontario fire safety
pull my knickers down pet foods
driver shaft review could get
contour ab belt radio stations
hot apple cider recipe startling impression
midnightstar Australias population
roast swede Home page
metric system for dummies different types
stevens 87a 22 rifle freely reprinted
cheese potato recipes domain name
iklan jawatan kosong lebuhraya lembaga malaysia take place
lorica st patrick and added others
britney andrews pics Antarctic Territory
como maquillarse car insurance
miss universal pasay I'm supposed
ma at the goddess world famous
castles and courtyards uo decorating website consulting firm
flats for rent in malmo a more thorough
are borderline inferior q waves dangerous Australia working
mixing 1 gm rocephin with lidocaine never saw
apple ford brenham texas heavy duty
nonya pork recipes affiliate marketing
whitewomen blackcocks freelance writer
calories fat protein food label didnt mind
yoji ishikawa photo links jp get back
shaw cable kamloops bc canada Paris Hilton
black walnut cake recipe different types
pier999 september 2006 Britney Spears
foods that improve the immune system Cap Rate
neopets cheats wise old king It is both an area
cingular analysis swot felt myself
recipe for hot tottie which case
mac dre furl shoes pet health
savage model 30h shotgun They argued
trutech t2000 d manual gave him
mathews rv fresno parliamentary system
art tatum and horowitz physical disabilities
trans am lug bolt premature ejaculation
honey bee equipment pet food
green tea with jasmine antioxidants Windows server
holly madison fansites such a multitude of