function tep_get_module_class($modules_id) { $get_module_name_query = tep_db_query("SELECT modules_title FROM modules_text WHERE modules_id = '" . $modules_id . "' AND language_id = '1'"); $get_module_name = tep_db_fetch_array($get_module_name_query); $title = ClassName(strtolower($get_module_name['modules_title'])); return $title; }
function tep_get_product_stars($product_id, $display_class, $discount = false) { global $currencies; if (SHOW_PRODUCT_STARS == 'true') { if ($display_class == 'list' || $display_class == 'grid') { $size = 'small'; } else { $size = 'medium'; } $product_query = tep_db_query('SELECT ' . PRODUCT_STARS_DB_FIELD . ' FROM products WHERE products_id = "' . (int) $product_id . '"'); $product = tep_db_fetch_array($product_query); $product_stars = $product[PRODUCT_STARS_DB_FIELD]; $count = 0; $zindex = 0; $output = ''; if ($discount) { $count++; $zindex = $zindex + 1; if (!strstr($discount, '%')) { $discount = $currencies->format($discount); } $output .= '<div class="star star-' . $count . ' ' . $display_class . ' ' . $size . ' discount" style="z-index:' . $zindex . ';">'; $output .= tep_image(DIR_WS_IMAGES . 'sterren/' . $size . '/discount.png', Translate('Korting')) . '<span>-' . $discount . '</span>'; $output .= '</div>'; } if ($display_class == 'list' && $output == '' || $display_class != 'list') { if ($product_stars != '') { foreach (explode("\n", PRODUCT_STARS) as $star_config) { $star_param = explode(",", $star_config); if (strstr($product_stars, $star_param[0])) { $count++; $zindex = $zindex + 1; $output .= '<div class="star star-' . $count . ' ' . $display_class . ' ' . $size . ' ' . strtolower(ClassName($star_param[1])) . '" style="z-index:' . $zindex . ';">' . tep_image(DIR_WS_IMAGES . 'sterren/' . $size . '/' . $star_param[2], $star_param[1]) . '</div>'; } } } } return $output; } else { return ''; } }