$default_smarty->assign('MODULE_new_products', $smarty->_tpl_vars[MAIN_CONTENT]); unset($smarty->_tpl_vars[MAIN_CONTENT]); } } // check to see if there are deeper categories within the current category $categories_query_sql = "\n\t\t\tselect\n c.categories_id,\n cd.categories_name,\n c.categories_image,\n c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n where c.categories_status = 1\n and c.parent_id = #\n and c.categories_id = cd.categories_id" . $group_check_c . "\n and cd.language_id = " . SESSION_LANGUAGE_ID . "\n order by sort_order, cd.categories_name"; $category_links = array_reverse($cPath_array); for ($i = 0, $n = sizeof($category_links); $i < $n; $i++) { $categories_query = olc_db_query(str_replace(HASH, $category_links[$i], $categories_query_sql)); if (olc_db_num_rows($categories_query) > 0) { // we've found the deepest category the customer is in break; } } while ($categories = olc_db_fetch_array($categories_query)) { $cPath_new = olc_get_path($categories['categories_id']); //$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%'; $categories_name = $categories['categories_name']; $image = $categories['categories_image']; if ($image) { $image = olc_image($cat_image_dir . $image, $categories_name, 200, 200); } $categories_content[] = array('CATEGORIES_NAME' => $categories_name, 'CATEGORIES_IMAGE' => $image, 'CATEGORIES_LINK' => olc_href_link(FILENAME_DEFAULT, $cPath_new, NONSSL, false, true, false), 'CATEGORIES_DESCRIPTION' => $categories['categories_description']); } $default_smarty->assign(MODULE_CONTENT, $categories_content); // get default template $module_dir = CURRENT_TEMPLATE_MODULE . 'categorie_listing/'; $directory = TEMPLATE_PATH . $module_dir; $categories_template = $category['categories_template']; if ($categories_template == EMPTY_STRING || $categories_template == 'default') { $files = olc_get_templates($directory);
$cInfo = new objectInfo($cInfo_array); $categories_name = stripslashes($cInfo->categories_name); $cInfo->categories_name = str_replace('\\', EMPTY_STRING, $categories_name); } } if (is_object($cInfo) && $categories_id == $cInfo->categories_id) { $selected = 'Selected'; echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="javascript:' . olc_onclick_link(FILENAME_CATEGORIES, olc_get_path($categories_id)) . '">' . NEW_LINE; } else { $selected = EMPTY_STRING; echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" ' . 'onmouseout="this.className=\'dataTableRow\'" onclick="javascript:' . olc_onclick_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id) . '">' . NEW_LINE; } $td_start = '<td class="dataTableContent' . $selected . '" '; $categories_name = stripslashes($categories['categories_name']); $categories_name = str_replace('\\', EMPTY_STRING, $categories_name); echo $td_start . '>' . $categories['sort_order'] . '</td>' . $td_start . '><a href="' . olc_href_link(FILENAME_CATEGORIES, olc_get_path($categories_id)) . '">' . olc_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '<a> <b><a href="' . olc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id) . '">' . $categories_name . '</a></b></td>'; // check Produkt and attributes stock if (STOCK_CHECK == TRUE_STRING_S) { if ($cPath != EMPTY_STRING) { echo $td_start . '> </td>'; } } if ($categories['categories_status'] == '1') { $link = olc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . olc_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=0&cID=' . $categories_id . '&cPath=' . $cPath) . '">' . olc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . HTML_A_END; } else { $link = HTML_A_START . olc_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=1&cID=' . $categories_id . '&cPath=' . $cPath) . '">' . olc_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . olc_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } echo $td_start . 'align="center">' . $link . '</td>'; if (is_object($cInfo) && $categories_id == $cInfo->categories_id) { $link = olc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', EMPTY_STRING); } else {
} } else { $random_products_price_real = $random_products_price; if (!is_object($product)) { $product = new product(); } $vpe = $product->getVPEtext($random_product, $random_products_price); $random_products_price = $xtPrice->xtcFormat($random_products_price, true, $tax_class, true, false); $tax_info = $main->getTaxInfo(olc_get_tax_rate($tax_class)); $picture_disclaimer = EMPTY_STRING; } } $categories_id = $random_product['categories_id']; $products_name = $random_product['products_name']; if ($products_name) { $category_path = olc_get_path($categories_id); $categories_name = $random_product['categories_name']; $image = $random_product['products_image']; if ($image) { $image = olc_image(DIR_WS_THUMBNAIL_IMAGES . $image, $products_name); } $products_id_par = 'products_id=' . $products_id; $link = HTML_A_START . olc_href_link(FILENAME_PRODUCT_INFO, $products_id_par) . '">'; $box_content = $link . olc_image(DIR_WS_THUMBNAIL_IMAGES . $image, $products_name) . HTML_A_END . HTML_BR . $link . $products_name . HTML_A_END . HTML_BR . $random_products_price; $box_smarty->assign('LINK', $link); $box_smarty->assign('IMAGE', $image); $box_smarty->assign('NAME', $products_name); $box_smarty->assign('PRICE', $random_products_price); $box_smarty->assign('TAX_INFO', $tax_info); $box_smarty->assign('BOX_CONTENT', $box_content); //$box_smarty->assign('MY_PAGE', TEXT_MY_PAGE);