Virtuemart make queries for all products in a category vm 2.6.x

Started by patben, November 12, 2015, 16:02:13 PM

Previous topic - Next topic

patben

(i hope that i post in correct category)
Hi, i look in joomla dubug and i show that virtuemart make queries for all products in one category, what i mean is that if a category has 491 products it generate

491 × SELECT `virtuemart_shoppergroup_id`
  FROM `m8jnx_virtuemart_product_shoppergroups`
491 × SELECT `virtuemart_media_id`
  FROM `m8jnx_virtuemart_product_medias`
491 × SELECT `m8jnx_virtuemart_products`.* ,`m8jnx_virtuemart_products_el_gr`.* ,`m8jnx_virtuemart_ratings`.`rating` ,`m8jnx_virtuemart_product_manufacturers`.`virtuemart_manufacturer_id` ,`m8jnx_virtuemart_product_customfields`.`virtuemart_customfield_id`
  FROM `m8jnx_virtuemart_products`
  INNER JOIN `m8jnx_virtuemart_products_el_gr` using (`virtuemart_product_id`)
  LEFT JOIN `m8jnx_virtuemart_ratings`
  on `m8jnx_virtuemart_ratings`.`virtuemart_product_id`=`m8jnx_virtuemart_products`.`virtuemart_product_id`
  LEFT JOIN `m8jnx_virtuemart_product_manufacturers`
  on `m8jnx_virtuemart_product_manufacturers`.`virtuemart_product_id`=`m8jnx_virtuemart_products`.`virtuemart_product_id`
  LEFT JOIN `m8jnx_virtuemart_product_customfields`
  on `m8jnx_virtuemart_product_customfields`.`virtuemart_product_id`=`m8jnx_virtuemart_products`.`virtuemart_product_id`
491 × SELECT *
  FROM `m8jnx_virtuemart_product_prices`
491 × SELECT pc.`virtuemart_category_id`
  FROM `m8jnx_virtuemart_product_categories` as pc
491 × SELECT pc.`virtuemart_category_id`
  FROM `m8jnx_virtuemart_product_categories` as pc
  LEFT JOIN `m8jnx_virtuemart_categories` as c
  ON c.`virtuemart_category_id` = pc.`virtuemart_category_id`
491 × SELECT `ordering`,`id`
  FROM `m8jnx_virtuemart_product_categories`


when i load category with  custom filters extension it generate only 24x....   24 is the number of products in one page. Why virtumart make queries for all products in one category, this make the category load very slow.

Thank you. 


---------------------edit---------------
I change to default joomla template and the problem solved, that mean that is a problem with my template. Is anything that i can do to solve it?

Studio 42

Hi,
Change template, or check for your template support.
No one can give answer for an unknow code ;)