// Let's have a look wether the product has related products.
$q = "SELECT product_sku, related_products FROM #__{vm}_product,#__{vm}_product_relations ";
$q .= "WHERE #__{vm}_product_relations.product_id='$product_id' AND product_publish='Y' ";
$q .= "AND FIND_IN_SET(#__{vm}_product.product_id, REPLACE(related_products, '|', ',' )) LIMIT 0, 4";
на
// Let's have a look wether the product has related products.
$q = "SELECT product_sku, related_products FROM #__{vm}_product,#__{vm}_product_relations ";
$q .= "WHERE #__{vm}_product_relations.product_id='$product_id' AND product_publish='Y' ";
$q .= "AND FIND_IN_SET(#__{vm}_product.product_id, REPLACE(related_products, '|', ',' )) LIMIT 0, 40";
2. Допиливаем вывод:
в файлике ''/components/com_virtuemart/themes/default/templates/common/relatedProducts.tpl.php''
меняем
while( $products->next_record() ) { ?>
product_snapshot( $products->f('product_sku') ) ?>
на
$i = 0;
while( $products->next_record() ) { ?>
product_snapshot( $products->f('product_sku') ) ?>
";
} ?>
{{tag>virtuemart сопутствующие_товары}}