0 && tep_count_products_in_category_without_sub($category_id) > 0 && $count < 10) { $randInt = rand(1,10); $randStart = $randInt -1; $produkt_query = tep_db_query( "select p.products_image as img from products p ". "LEFT OUTER JOIN products_to_categories ptc ON ". "p.products_id = ptc.products_id ". "WHERE LENGTH(p.products_image) > 0 ". "AND ptc.categories_id = ".$category_id); while($result = tep_db_fetch_array($produkt_query)) { $retun_val = $result['img']; if(rand(1,10) > 8) break; } if(!(tep_not_null($retun_val)) && tep_has_category_subcategories($category_id)) { $retun_val = get_random_cat_image_from_child($category_id,$count); } } else if($category_id > 0 && tep_has_category_subcategories($category_id) && $count < 10) { $retun_val = get_random_cat_image_from_child($category_id,$count); } else { $retun_val = EMPTY_CAT_IMAGE; } return $retun_val; } function get_random_cat_image_from_child($category_id,$count = 0) { $retun_val; $category_query = tep_db_query("select categories_id as ID from ". TABLE_CATEGORIES ." WHERE parent_id = ". $category_id ." LIMIT 0,". rand(1,10) ); while($ids = tep_db_fetch_array($category_query)) { $id = $ids['ID']; $retun_val = get_random_cat_image($id, $count++); if((tep_not_null($retun_val)) && $retun_val != EMPTY_CAT_IMAGE) break; } return $retun_val; } //Changed from osCommerce function tep_count_products_in_category_without_sub($category_id, $include_inactive = false) { $products_count = 0; if ($include_inactive == ftrue) { $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$category_id . "'"); } else { $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); } $products = tep_db_fetch_array($products_query); return $products['total']; } ?> Numeri civici - fd-bolletta lampade ...
fd-bolletta;
   Home Page   Login  Registrati   Guarda i nostri Video    Condizioni & Garanzie    Privacy   Mappa del Sito
Categorie  

Prodotti in offerta...
Nuovi prodotti...
Tutti i prodotti...
Novità  Altro
Super Vittoria vecchio vaporizzatore a336
Super Vittoria vecchio vaporizzatore a336
Eur80.00
Informazioni  
Guarda i nostri Video
Privacy
Condizioni & Garanzie
Chi siamo
Dove Siamo
Diritto di recesso
FAQ
Contattaci
Mappa del Sito
Pagamenti  
Numeri civici