Короче есть решение!
у меня, по крайней мере, работает:
Нужно внести изминения в файл
/administrator/components/com_virtuemart/models/product.php
После кода:
$joinShopper = TRUE;
}
}
Вставляем:
// galt: begin edit 1 of 6
$additionalTableJoins = '';
$useDefaultVMManufacturers = true;
if ((isset($isSite) && $isSite) || $app->isSite()) {
$cp_added_prices = false;
// ----------------------------------
// Cherry Picker Product Types 3
// ----------------------------------
$cpProductTypesHelper = JPATH_BASE .'/modules/mod_vm_cherry_picker/helpers/vmFilterProcessor.php';
if (file_exists($cpProductTypesHelper)) {
require_once($cpProductTypesHelper);
$prices = VMFilterProcessorPT::getPriceSelection();
if ($prices) {
// New, more sophisticated way to search by prices
if (is_array($prices)) {
$additionalTableJoins .= ' '. $prices['join'];
$where[] = $prices['where'];
if ($prices['join_manufacturers'])
$joinMf = true;
} else {
$where[] = $prices;
}
$joinPrice = true;
$cp_added_prices = true;
}
$filtersData = VMFilterProcessorPT::getFilterSelection();
if ($filtersData) {
$where[] = $filtersData['where'];
$additionalTableJoins .= ' '. $filtersData['join'];
//$_SESSION['pt_filters_where'] = $filtersData['where'];
//$_SESSION['pt_filters_join'] = $filtersData['join'];
} else {
//$_SESSION['pt_filters_where'] = null;
//$_SESSION['pt_filters_join'] = null;
}
if (method_exists('VMFilterProcessorPT', 'getManufacturersSelection')) {
$manufacturers = VMFilterProcessorPT::getManufacturersSelection();
if ($manufacturers) {
$where[] = $manufacturers;
$joinMf = true;
$useDefaultVMManufacturers = false;
}
}
}
// ----------------------------------
// Cherry Picker Custom Fields 2
// ----------------------------------
$cpCustomFieldsHelper = JPATH_BASE .'/modules/mod_vm_cherry_picker_cf/helpers/vmFilterProcessor.php';
if (file_exists($cpCustomFieldsHelper)) {
require_once($cpCustomFieldsHelper);
// If there are CF and PT versions of CP on page, process prices just once
if ( !$cp_added_prices && ($prices = VMFilterProcessorCF::getPriceSelection())) {
// New, more sophisticated way to search by prices
if (is_array($prices)) {
$additionalTableJoins .= ' '. $prices['join'];
$where[] = $prices['where'];
if ($prices['join_manufacturers'])
$joinMf = true;
} else {
$where[] = $prices;
}
$joinPrice = true;
}
$join = VMFilterProcessorCF::getFilterSelection();
if ($join)
$additionalTableJoins .= ' '. $join;
//$_SESSION['cf_filters_join'] = $join;
// If manufacturers weren't processed by PT version
if ($useDefaultVMManufacturers &&
method_exists('VMFilterProcessorCF', 'getManufacturersSelection')) {
$manufacturers = VMFilterProcessorCF::getManufacturersSelection();
if ($manufacturers) {
$where[] = $manufacturers;
$joinMf = true;
$useDefaultVMManufacturers = false;
}
}
}
}
// galt: end edit 1
// galt: edit 2 of 6
// We use Cherry Picker's method for front-end as it is able
// to manage multiple Manufacturers selection
if ($this->virtuemart_manufacturer_id && $useDefaultVMManufacturers) {
$joinMf = true ;
$where[] = ' `#__virtuemart_product_manufacturers`.`virtuemart_manufacturer_id` = '.$this->virtuemart_manufacturer_id;
}
ПЕРЕД
if (count ($where) > 0) {
$whereString = ' WHERE (' . implode ("\n AND ", $where). ') ';
}
вставляем:
// galt: edit 3 of 6
// Include additional table JOINs
if ($additionalTableJoins)
$joinedTables[] = ' '. $additionalTableJoins;
// galt: end edit 3
всего три вставки.