$list_box_contents = ''; if ($num_categories > 0) { reset($shopping_categories->fields); while (!$shopping_categories->EOF and !($row == 3)) { $subCatoryString = ''; if (!$shopping_categories->fields['categories_image']) { !($shopping_categories->fields['categories_image'] = 'pixel_trans.gif'); } $parent_cPath_new = zen_get_path($shopping_categories->fields['categories_id']); // strip out 0_ from top level cats $parent_cPath_new = str_replace('=0_', '=', $parent_cPath_new); // $shopping_categories->fields['products_name'] = zen_get_products_name($shopping_categories->fields['products_id']); $subCatoryQuery = 'SELECT c1.`categories_id`, c.`categories_name` FROM categories_description c, categories c1 WHERE c1.categories_id=c.categories_id and c.language_id = ' . $_SESSION['languages_id'] . ' and parent_id = ' . $shopping_categories->fields['categories_id'] . ' limit 5'; $subCatory = $db->Execute($subCatoryQuery); while (!$subCatory->EOF) { $cPath_new = zen_get_path($subCatory->fields['categories_id']); $cPath_new = str_replace('=0_', '=', $cPath_new); $subCatoryString .= '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '" title="' . SEO_COMMON_KEYWORDS . ' ' . $subCatory->fields['categories_name'] . '">' . zen_clipped_string($subCatory->fields['categories_name']) . '</a><br />'; $subCatory->MoveNext(); } $subCatoryString .= '<a href="' . zen_href_link(FILENAME_DEFAULT, $parent_cPath_new) . '" class="more_product">' . BASE_COMMON_TEXT_MOREWHOLESALEPRODUCTS . ' ></a>'; $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"', 'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $parent_cPath_new) . '" class="ih fl" title="' . SEO_COMMON_KEYWORDS . ' ' . $shopping_categories->fields['categories_name'] . '">' . zen_image(DIR_WS_IMAGES . $shopping_categories->fields['categories_image'], $shopping_categories->fields['categories_name'], 86, '', ' class="fl"') . '</a><div class="block pad_l_90px"><h3><a href="' . zen_href_link(FILENAME_DEFAULT, $parent_cPath_new) . '" title="' . SEO_COMMON_KEYWORDS . ' ' . $shopping_categories->fields['categories_name'] . '">' . $shopping_categories->fields['categories_name'] . '</a></h3>' . $subCatoryString . '</div>'); $col++; if ($col > MAX_DISPLAY_CATEGORIES_PER_ROW - 1) { $col = 0; $row++; } $shopping_categories->MoveNext(); } }
echo zen_image_OLD(DIR_WS_IMAGES . $recommended_products_items[$i]['products_image'], SEO_COMMON_KEYWORDS . ' ' . $recommended_products_name_con[$i], 85, 85, 'id="cell_img' . $i . '"'); ?> </a> </div> <p><span id="cell_name<?php echo $i; ?> "> <a id="cell_name_link<?php echo $i; ?> " href="<?php echo zen_href_link(zen_get_info_page($recommended_products_items[$i]['products_id']), 'products_id=' . $recommended_products_items[$i]['products_id']); ?> "><?php echo zen_clipped_string($recommended_products_items[$i]['products_name'], ' ', 20); ?> </a></span> <br/><del id="cell_source_price<?php echo $i; ?> "><?php echo $currencies->display_price($recommended_products_items[$i]['products_price_retail'], zen_get_tax_rate($recommended_products_items[$i]['products_id'])); ?> </del> <br/><strong id="cell_price<?php echo $i; ?> " class="red"><?php echo $currencies->display_price($recommended_products_items[$i]['products_price'] == 0 ? $recommended_products_items[$i]['products_price_sample'] : $recommended_products_items[$i]['products_price'], zen_get_tax_rate($recommended_products_items[$i]['products_id'])); ?>
function staticCategoriesList($listIDs, $staticWord) { global $db, $currencies; $i = 0; $rows = 1; $listArray = explode(',', $listIDs); $listNum = count($listArray); $listNum = $listNum > 8 ? 8 : $listNum; echo '<ul class="wholesale">'; for ($i; $i < $listNum; $i++) { $listProducts = zen_get_products_ids_categories($listArray[$i]); if (count($listProducts) > 0) { $result = $db->Execute("SELECT products_image, products_price\n\t \t\t FROM " . TABLE_PRODUCTS . " p \n\t \t\t WHERE p.`products_id` = " . $listProducts[0]); if (is_int($rows / 4)) { echo '<li>'; } else { echo '<li class="border_r_dash">'; } echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" class="ih">'; echo zen_image(DIR_WS_IMAGES . str_replace('s/', 'l/', $result->fields['products_image']), zen_get_category_name($listArray[$i], $_SESSION['languages_id']), 113, 113); echo '</a>'; echo '<div class="margin_t pad_text">'; echo '<strong><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listArray[$i]) . '" >' . zen_get_category_name($listArray[$i], $_SESSION['languages_id']) . '</a></strong>'; echo '<br/>' . zen_clipped_string(zen_get_category_bottom_description($listArray[$i], $_SESSION['languages_id']), ' ', 150) . '<br/>'; echo '<h4 class="red">Price: ' . $currencies->display_price($result->fields['products_price'], zen_get_tax_rate($listProducts[0])) . '</h4>'; echo '</div>'; echo '</li>'; $rows++; } else { //nothing } } echo '</ul>'; }
$display_num = 12; $subCategoriesArray = array(); if (isset($_GET['products_id'])) { $relatedCategoriesParentId = zen_get_products_category_id($_GET['products_id']); $relatedCategoriesId = zen_get_categories_parent_id($relatedCategoriesParentId); zen_get_subcategoriesarray($subCategoriesArray, $relatedCategoriesId); } else { if (isset($current_category_id)) { $parent_id = zen_get_categories_parent_id($current_category_id); zen_get_subcategoriesarray($subCategoriesArray, $relatedCategoriesId); } } $relatedCategoriesTotalNum = count($subCategoriesArray); ?> <div class="fl allborder line_180" id="relate_cate"> <h4 class="red line_30px in_1em"><?php echo BASE_COMMON_TEXT_RELATEDCATEGORIES; ?> </h4> <ul> <?php if ($relatedCategoriesTotalNum > 0) { for ($i = 0; $i < $display_num; $i++) { echo '<li><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $subCategoriesArray[$i]['categories_id']) . '" title="' . SEO_COMMON_KEYWORDS . $subCategoriesArray[$i]['categories_name'] . '">' . zen_clipped_string($subCategoriesArray[$i]['categories_name']) . '</a></li>'; } } unset($row, $display, $subCategoriesArray, $related_categories_query); ?> </ul> </div>