Проблему решил.
Если кому интересно, ниже описываю как это сделал.
Всё делается в файле /components/com_virtuemart/themes/default/templates/browse/includes/browse_listtable.tpl.php
Решение довольно простое и не тривиальное.
Вот код:
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__); ?>
<?php echo $browsepage_header // The heading, the category description ?>
<?php echo $parameter_form // The Parameter search form ?>
<?php echo $orderby_form // The sort-by, order-by form PLUS top page navigation ?>
<?php
$data =array(); // Holds the rows of products
$i = 1; $row = 0; // Counters
// Table header
if ($category_id == 1 || $category_id == 6 || $category_id == 7) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_NAME').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_SIZE1').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_WEIGHT').'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_PRICE').'</center>';
}
// $tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');
if( _SHOW_PRICES && $auth['show_prices'] && USE_AS_CATALOGUE != '1' ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_ACTION').'</center>';
}
// Creates a new HTML_Table object that will help us
// to build a table holding all the products
$table =& new HTML_Table('width="100%"');
$table->addRow( $tableheader, 'class="sectiontableheader"', 'th', true );
foreach( $products as $product ) {
foreach( $product as $attr => $val ) {
// Using this we make all the variables available in the template
// translated example: $this->set( 'product_name', $product_name );
$this->set( $attr, $val );
}
$data[$row][] = $product['product_name'];
$data[$row][] = '<center>'.$product['km_size1'].'</center>';
$data[$row][] = '<center>'.$product['km_weight'].'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$data[$row][] = '<center>'.$product['product_price'].'</center>';
}
// $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
// . ps_product::image_tag( $product['product_thumb_image'] )
// . '</a>';
if( $product['has_addtocart'] ) {
$data[$row][] = '<center>'.$product['form_addtocart'].'</center>';
}
else {
$data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
. $product['product_details']
. '</a>';
}
$row++;
}
}
elseif ($category_id == 12 || $category_id == 13 || $category_id == 14 || $category_id == 15) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_NAME').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_SIZE').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_SIZE1').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_TYPE').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_KM_KOL').'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_PRICE').'</center>';
}
// $tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');
if( _SHOW_PRICES && $auth['show_prices'] && USE_AS_CATALOGUE != '1' ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_ACTION').'</center>';
}
// Creates a new HTML_Table object that will help us
// to build a table holding all the products
$table =& new HTML_Table('width="100%"');
$table->addRow( $tableheader, 'class="sectiontableheader"', 'th', true );
foreach( $products as $product ) {
foreach( $product as $attr => $val ) {
// Using this we make all the variables available in the template
// translated example: $this->set( 'product_name', $product_name );
$this->set( $attr, $val );
}
$data[$row][] = $product['product_name'];
$data[$row][] = '<center>'.$product['km_size'].'</center>';
$data[$row][] = '<center>'.$product['km_size1'].'</center>';
$data[$row][] = '<center>'.$product['km_type'].'</center>';
$data[$row][] = '<center>'.$product['km_kol'].'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$data[$row][] = '<center>'.$product['product_price'].'</center>';
}
// $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
// . ps_product::image_tag( $product['product_thumb_image'] )
// . '</a>';
if( $product['has_addtocart'] ) {
$data[$row][] = '<center>'.$product['form_addtocart'].'</center>';
}
else {
$data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
. $product['product_details']
. '</a>';
}
$row++;
}
}
else {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_NAME').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_SKU').'</center>';
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_PRODUCT_DESC_TITLE').'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_PRICE').'</center>';
}
// $tableheader[] = $VM_LANG->_('PHPSHOP_PRODUCT_FORM_THUMB_IMAGE');
if( _SHOW_PRICES && $auth['show_prices'] && USE_AS_CATALOGUE != '1' ) {
$tableheader[] = '<center>'.$VM_LANG->_('PHPSHOP_CART_ACTION').'</center>';
}
// Creates a new HTML_Table object that will help us
// to build a table holding all the products
$table =& new HTML_Table('width="100%"');
$table->addRow( $tableheader, 'class="sectiontableheader"', 'th', true );
foreach( $products as $product ) {
foreach( $product as $attr => $val ) {
// Using this we make all the variables available in the template
// translated example: $this->set( 'product_name', $product_name );
$this->set( $attr, $val );
}
$data[$row][] = $product['product_name'];
$data[$row][] = '<center>'.$product['product_sku'].'</center>';
$data[$row][] = '<center>'.$product['product_s_desc'].'</center>';
if( _SHOW_PRICES && $auth['show_prices'] ) {
$data[$row][] = '<center>'.$product['product_price'].'</center>';
}
// $data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
// . ps_product::image_tag( $product['product_thumb_image'] )
// . '</a>';
if( $product['has_addtocart'] ) {
$data[$row][] = '<center>'.$product['form_addtocart'].'</center>';
}
else {
$data[$row][] = '<a href="'.$product['product_flypage'].'" title="'.$product['product_name'].'">'
. $product['product_details']
. '</a>';
}
$row++;
}
}
// Loop through each row and build the table
foreach($data as $key => $value) {
$table->addRow( $data[$key], 'class="sectiontableentry'.$i.'"', 'td', true );
$i = $i == 1 ? 2 : 1;
}
// Display the table
echo $table->toHtml();
?>
<br class="clr" /><br />
<?php echo $browsepage_footer ?>
<?php
// Show Featured Products
if( $this->get_cfg( 'showFeatured', 1 )) {
/* featuredproducts(random, no_of_products,category_based) no_of_products 0 = all else numeric amount
edit featuredproduct.tpl.php to edit layout */
echo $ps_product->featuredProducts(true,10,true);
} ?>
<?php echo $recent_products ?>
Т.е. простой вывод по категориям, через операторы elseif и else.
Если категория такая-то, то выводим определенный набор столбцов, если такая - другой, и так далее.
Единственное пришлось добавлять новые поля в базу, но это не сложно, вот здесь описано как
http://joomlaforum.ru/index.php/topic,36710.0.html