Yepi1533005574 Posted June 29, 2018 Share Posted June 29, 2018 Hallo Leute, irgend etwas läuft hier falsch. Bei der Abrfage und der Auflistung ist alles ok sobald ich von der index.php auf den Button klicke öffnet sich eine dropdown-Liste mit neuen Produkten. Bin ich jetzt auf der product_info.php so bekomme ich nur das eine Produkt in der Liste angezeigt. Sieht jemand den Fehler ? Ich meine, die dropdown-Liste soll immer alle Produkte zeigen. ************************************ global $oscTemplate, $languages_id, $currencies, $currency; $content_width = (int)MODULE_CONTENT_HEADER_NEW_PRODUCTS_CONTENT_WIDTH; // products_new products query $random_select = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_image, pd.products_name, p.products_price, p.products_baseprice, 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, p.products_quantity as in_stock from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"; if (isset($_GET['products_id'])) { $random_select .= " and p.products_id = '" . (int)$_GET['products_id'] . "'"; } $random_select .= " order by rand() limit " . MODULE_CONTENT_HEADER_NEW_PRODUCTS_CONTENT_LIMIT; $random_query = tep_db_query($random_select); $num_new_products = tep_db_num_rows($random_query); $linkArray[] = '<li><a href="' . tep_href_link('products_new.php') . '">' . MODULE_CONTENT_HEADER_NEW_PRODUCTS_MODULE_VIEW_ALL . '</a>'; $linkArray[] .= '<li role="separator" class="divider"></li>'; if ($num_new_products) { // display products_new menu while ($products = tep_db_fetch_array($random_query)) { $linkArray[] = '<li><a href="' . tep_href_link('product_info.php', 'products_id=' . $products['products_id']) .'">'; $linkArray[] .= tep_image ('images/' . $products['products_image'], NULL, '40', '40', null, false); $linkArray[] .= ' ' . $products['products_name']; // display products_new price if (tep_not_null($products['specials_new_products_price'])) { $linkArray[] .= ' <del>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</del>'; $linkArray[] .= ' <span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . $pls_baseprice . $pls_taxinfo . $pls_saving_info . $pls_shipping_info .'</span>'; }else{ $linkArray[] .= ' <span itemprop="price" content="' . $currencies->display_raw($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '">' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . $pls_baseprice . $pls_taxinfo . $pls_shipping_info .'</span>'; } $linkArray[] .= '</a></li>'; } } // display products_new dpd button $new_products_menu_contents .= '<div class="btn-group btn-block"> <button type="button" class="btn btn-info btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-certificate"></i> ' . MODULE_CONTENT_HEADER_NEW_PRODUCTS_MODULE_TITLE . ' <i class="fa fa-caret-down"></i> </button><ul class="dropdown-menu" style="min-width:100%;">'; foreach ($linkArray as $link) { $new_products_menu_contents .= $link; } $new_products_menu_contents .= ' </ul></div>'; $new_products_menu_contents .= '</div>'; Link to comment Share on other sites More sharing options...
Yepi1533005574 Posted June 29, 2018 Author Share Posted June 29, 2018 Hab den Fehler gefunden. Link to comment Share on other sites More sharing options...
Recommended Posts