Как я понимаю, страницу подраздела вот этот кусок кода формирует, потому что в шаблонах я не нашел ничего...
function print_child_list($category_id) {
echo $this->get_child_list($category_id);
}
/**
* creates a bulleted of the childen of this category if they exist
* @author pablo
* @param int $category_id
* @return string The HTML code
*/
function get_child_list($category_id) {
global $sess, $ps_product, $VM_LANG;
$ps_vendor_id = $_SESSION["ps_vendor_id"];
$db = new ps_DB;
$html = "";
$q = "SELECT category_id, category_thumb_image, category_child_id,category_name FROM #__{vm}_category,#__{vm}_category_xref ";
$q .= "WHERE #__{vm}_category_xref.category_parent_id='$category_id' ";
$q .= "AND #__{vm}_category.category_id=#__{vm}_category_xref.category_child_id ";
$q .= "AND #__{vm}_category.vendor_id='$ps_vendor_id' ";
$q .= "AND #__{vm}_category.category_publish='Y' ";
$q .= "ORDER BY #__{vm}_category.list_order, #__{vm}_category.category_name ASC";
$db->setQuery($q);
$db->query();
if( $db->num_rows() > 0 ) {
$iCol = 1;
$categories_per_row = 1;
$cellwidth = intval( 100 / $categories_per_row );
$html .= $VM_LANG->_PHPSHOP_MORE_CATEGORIES.'<br/>';
$html .= '<table width="100%" cellspacing="0" cellpadding="0">';
while($db->next_record()) {
if ($iCol == 1) {
$html.= "<tr>\n";
}
$html.= '<td align="left" width="'. $cellwidth .'%" ><br/>
<a title="'. $db->f("category_name").'" href="'. $sess->url(URL."index.php?option=com_virtuemart&page=shop.browse&category_id=".$db->f("category_id")) .'">';
if ( $db->f("category_thumb_image") ) {
$html.= $ps_product->image_tag( $db->f("category_thumb_image"), "alt=\"".$db->f("category_name")."\"", 0, "category");
$html.= "<br /><br/>";
}
$html.= $db->f("category_name");
$html.= ps_product_category::products_in_category( $db->f("category_id") );
$html.= "</a><br/>\n";
$html .= "</td>\n";
if ($iCol == $categories_per_row) {
$html.= "</tr>\n";
$iCol = 1;
}
else {
$iCol++;
}
}
if ($db->num_rows() < $categories_per_row) {
$html.= "</tr>\n";
}
$html.= "</table>";
}
return $html;
}
Как его можно отредактировать? что бы все правильно отображалось, я пытался отредактировать, но у меня страница просто полностью перестала грузиться ((