'; $product_check_query = tep_db_query("select count(*) as total, p.wawi_manufacturer, p.wawi_order_number, p.products_availability, p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '2'"); $product_check = tep_db_fetch_array($product_check_query); if ($product_check['total'] < 1){ tep_redirect(tep_href_link("/index.php")); } $languages_id = 2; $the_manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name, mi.manufacturers_url, m.manufacturers_image from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id"); $the_manufacturers = tep_db_fetch_array($the_manufacturer_query); $product_check_query = tep_db_query("select count(*) as total, p.wawi_manufacturer, p.wawi_order_number, p.products_availability, p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); if ($product_check['total'] < 1){ $the_title = TITLE; $the_product_info = ""; $the_product_name = ""; $the_product_description = ""; $the_product_model = ""; } else { $product_info_query = tep_db_query("select p.bundle_products, p.wawi_weight, p.products_ean, p.wawi_comment, p.bgg_rank, bgg_id, p.wawi_manufacturer, pa.rules_it, pa.rules_de, pa.rules_en, pa.rules_fr, pa.rules_po, pa.rules_es, pa.rules_nl, p.products_quantity, p.products_warning, p.products_availability, p.products_addition, p.products_id, pd.products_name, p.products_weight, pd.products_description, p.products_model, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_author, p.products_grafik, p.products_subline, p.products_warning_m, p.products_rules, p.products_content, p.products_length, p.products_age, p.products_year, p.products_count_from, p.products_count_to, p.video from " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id LEFT JOIN products_addition pa ON p.products_id = pa.products_id where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); $the_title = $product_info['products_name']; if( $product_info['products_count_from'] ) { $the_title .= ' | ' . $product_info['products_count_from']; if( $product_info['products_count_to'] && $product_info['products_count_from'] != $product_info['products_count_to'] ) { $the_title .= ' bis ' . $product_info['products_count_to']; } $the_title .= ' Spieler'; } if( $product_info['products_length'] ) { $the_title .= ' | Spieldauer ca. ' . $product_info['products_length'] . ' Min.'; } if( $product_info['products_age'] ) { $the_title .= ' | Empfohlen ab ' . $product_info['products_age'] . ' Jahren'; } $the_title .= ' | Kaufen bei Milan Spiele - Shop für Brettspiele und Kartenspiele'; $the_product_info = tep_db_fetch_array($product_info_query); $the_product_name = strip_tags ($product_info['products_name'], ""); $the_product_description = $product_info['products_name'] . " das Spiel günstig bestellen. Zuletzt aktualisiert am " . date("d.m.Y", time()) . ". " . strip_tags ($product_info['products_description'], ""); $the_product_model = strip_tags ($product_info['products_model'], ""); $prod_status = $product_info[ "products_availability" ]; tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_final_price = str_replace(",",".", $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))); $old_price = tep_add_tax($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); $percent_value = round(($old_price-tep_add_tax($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])))*100/$old_price); $products_price = ' Jetzt ' . $percent_value . '% sparen!
'; $output_price = number_format(tep_round(tep_add_tax($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']) ),2), 2, ',', '.') . " €"; $products_price .= '' . number_format(tep_round(tep_add_tax($new_price, tep_get_tax_rate($product_info['products_tax_class_id']) ),2), 2, ',', '.') . ' € ' . $output_price . '' . ''; //$products_price .= 'Statt ' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ' nur ' . $new_price . ''; $shippingPrice = tep_add_tax($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])); } else { $products_final_price = str_replace(",",".", $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))); if ( $prod_status == 5 ) { $products_price = "--,-- €"; } else { $products_price = '' . number_format(tep_round(tep_add_tax($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])), 2), 2, ",", ".") . " €"; } $shippingPrice = tep_add_tax($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } } require(DIR_WS_INCLUDES . 'header.php'); ?>
0 AND products_status = 1;" ); $product_g = tep_db_fetch_array($product_g_query); $product_2_query = tep_db_query("select products_id, products_model, products_availability, products_quantity, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " WHERE products_model LIKE '" . $the_product_model . "_2%' AND products_quantity > 0 AND products_status = 1;" ); $product_2 = tep_db_fetch_array($product_2_query); if( !$product_2 ) { $product_2_query = tep_db_query("select products_id, products_model, products_availability, products_quantity, products_price, products_tax_class_id from " . TABLE_PRODUCTS . " WHERE products_model LIKE '" . $the_product_model . "_Z%' AND products_quantity > 0 AND products_status = 1;" ); $product_2 = tep_db_fetch_array($product_2_query); } } if ( $product_info['products_author'] != null && $product_info['products_author'] != "" ) { $authors = explode( ', ', $product_info['products_author'] ); $authorCount = 0; foreach ( $authors as $author ) { $authorCount++; $authorString .= '' . $author . ', '; } $authorString = substr( $authorString, 0, strlen( $authorString ) - 2 ); } if ( $product_info['products_count_from'] > 0 ) { if ( $product_info['products_count_from'] == $product_info['products_count_to'] ) { $players = $product_info['products_count_from']; } else { $players = $product_info['products_count_from'] . " - " . $product_info['products_count_to']; } } if ( $product_info['products_length'] > 0 ) { $products_length = "ca. " . $product_info['products_length'] . " Minuten"; if ( $product_info['products_length'] == 1000 ) { $products_length ="beliebig"; } } $output_manufacturers = '' . $the_manufacturers['manufacturers_name'] . ""; $prod_quantity = $product_info[ "products_quantity" ]; if ( $prod_quantity < 1 ) { if ($prod_status == 5) { $statusString = '
' . TEXT_AVAILABILITY_GREY; } else if ($prod_status == 4) { $statusString = '
' . TEXT_AVAILABILITY_BLUE; } else if ($prod_status == 6) { $statusString = '
' . TEXT_AVAILABILITY_RED; } else if ($prod_status == 2) { $wawi_manufacturer = $product_info['wawi_manufacturer']; require_once('includes/delivery_days.php'); $statusString = '
' . sprintf(TEXT_AVAILABILITY_LGREEN, $delivery_days); } else if ($prod_status == 3 ) { $statusString = '
' . TEXT_AVAILABILITY_YELLOW; } } else { if( $product_info['products_id'] == 20305 OR $product_info['products_id'] == 19355 OR $product_info['products_id'] == 17872 ) { $statusString = '
' . sprintf(TEXT_AVAILABILITY_LGREEN, $delivery_days); } else { $statusString = '
' . TEXT_AVAILABILITY_GREEN; } } $day = date("j",time()); $month = date("m",time()); $showStockBar1 = false; $showStockBar2 = false; //$month = 12; //$day = 1; if( true ) { if( (!strstr($product_info['wawi_comment'], 'supadupa') )) { foreach( $calendarProducts as $calendarProduct ) { if( $calendarProduct['productsId'] == $HTTP_GET_VARS['products_id'] ) { if( $calendarProduct['status'] && $calendarProduct['totalAmount'] ) { $gesamtVorrat = $calendarProduct['totalAmount']; $showStockBar1 = true; } break; } else if( $calendarProduct['productsId_2'] == $HTTP_GET_VARS['products_id'] && $new_price ) { if( $calendarProduct['status'] ) { $gesamtVorrat = $calendarProduct['totalAmount_2']; $showStockBar1 = true; } break; } } if( $gesamtVorrat ) { if( in_array($HTTP_GET_VARS['products_id'], $ids) || $HTTP_GET_VARS['products_id'] == 33145 ) { $product_info['products_quantity'] = $gesamtVorrat+$product_info['products_quantity']; } $percentAmount = 100-round(($product_info['products_quantity']/$gesamtVorrat)*100); if( $percentAmount > 100 ) { $percentAmount = 100; } if( $product_info['products_quantity']>0 && $percentAmount == 100 ) { $percentAmount = 99; } } } else if( strstr($product_info['wawi_comment'], 'supadupa') ) { $items = explode(';', $product_info['wawi_comment']); $gesamtVorrat = intval($items[1]); $sonderVorrat = intval($items[2]); if( $gesamtVorrat ) { $percentAmount = round((($gesamtVorrat-$product_info['products_quantity'])/$sonderVorrat)*100); $showStockBar2 = true; } } } $statusString .= ' (Info).
'; if ( $prod_quantity < 1 && $prod_status != 6 ) { if ($prod_status == 4 || $prod_status == 5) { $art= "neu"; } else { $art = "alt"; } } $productsYear = ''; if ( $product_info['products_year'] != -1 && $product_info['products_year'] != 0 ) { $productsYear = '(' . $product_info['products_year'] . ')'; } $specials_query = tep_db_query("SELECT * FROM ja_wkdat WHERE product_id = ". (int)$HTTP_GET_VARS['products_id']); $count_specials = tep_db_num_rows($specials_query); if (strpos( $product_info['products_name'], "(2. Wahl)" ) || strpos( $product_info['products_name'], "(gebraucht)" ) > 0 ) { //$products_image = strtolower($the_product_model) . ".jpg"; //if( file_exists(getProductImage($product_info['products_image']) ) ) { // $product_info['products_image'] = $products_image; //} } if (file_exists( getProductImage($product_info['products_image'] ) ) ) { //$picture2 = substr($product_info['products_image'],0,-4) ."a.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'a') )) { $pic2 = '
' . tep_image(getProductImage($product_info['products_image'], 'a'), addslashes('Bild 2'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } //$picture3 = substr($product_info['products_image'],0,-4) ."b.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'b') )) { $pic3 = '' . tep_image(getProductImage($product_info['products_image'], 'b'), addslashes('Bild 3'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } //$picture4 = substr($product_info['products_image'],0,-4) ."c.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'c') )) { $pic4 = '' . tep_image(getProductImage($product_info['products_image'], 'c'), addslashes('Bild 4'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } //$picture5 = substr($product_info['products_image'],0,-4) ."d.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'd') )) { $pic5 = '' . tep_image(getProductImage($product_info['products_image'], 'd'), addslashes('Bild 4'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } //$picture5 = substr($product_info['products_image'],0,-4) ."e.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'e') )) { $pic6 = '' . tep_image(getProductImage($product_info['products_image'], 'e'), addslashes('Bild 4'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } //$picture5 = substr($product_info['products_image'],0,-4) ."f.jpg"; if (file_exists( getProductImage($product_info['products_image'], 'f') )) { $pic7 = '' . tep_image(getProductImage($product_info['products_image'], 'f'), addslashes('Bild 4'), 25, 25, '', 'mid2', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } $pic = ''; $pic .= tep_image( getProductImage($product_info['products_image']), addslashes($product_info['products_name']), 200, 300, 'hspace="5" vspace="5"', 'mid', 0, DIR_WS_PRODUCT_IMAGES . substr($product_info['products_image'],0,2) . "/") . ''; } else { $pic = ''; $pic .= '' . TEXT_MISSING_PICTURE . ''; } ?>