Skip to main content

Shop is very slow everywhere i click

More
11 years 2 weeks ago - 11 years 1 week ago #214970 by tampasounds
Thanks for the reply
Last edit: 11 years 1 week ago by tampasounds.

Please Log in or Create an account to join the conversation.

More
11 years 1 week ago #215198 by tampasounds
Ok all joins are now removed and the results are coming back between 4-6 sec which is a huge improvement
Also removed badge code since we don't use those.

Next question
Line Card (Brands) (Manufacturers) page... 11-14 seconds
What file do i edit to work on that next ?

Please Log in or Create an account to join the conversation.

More
11 years 1 week ago #215265 by Jerome
Hi,

Your page "Line Card" is a brand listing ; a brand in a category in HikaShop database, so the category views are using for brands too.

Regarding the page, if you remove the setting "show the number of products", you will improve the loading of the page because HikaShop won't need to count the number of products for each brand in the list (and because a page display 500 brands, it could result a high number of data to process).

If you want to custom the view, it's the file "components/com_hikashop/views/category/view.html.php"
In that file you will find that block for the counting of the products
Code:
if($number_of_products){ $additional_condition=''; if($content_type=='manufacturer'){ if(!$config->get('show_out_of_stock',1)){ $additional_condition=' AND a.product_quantity!=0'; } $database->setQuery('SELECT count(a.product_id) AS number_of_products,a.product_manufacturer_id as category_id FROM '.hikashop_table('product').' AS a WHERE a.product_published>0'.$additional_condition.' AND a.product_parent_id=0 AND a.product_manufacturer_id IN ('.implode(',',$ids).') GROUP BY a.product_manufacturer_id'); }else{ if(!$config->get('show_out_of_stock',1)){ $additional_condition=' AND b.product_quantity!=0'; } $database->setQuery('SELECT count(a.product_id) AS number_of_products,a.category_id FROM '.hikashop_table('product_category').' AS a INNER JOIN '.hikashop_table('product').' AS b ON a.product_id=b.product_id AND b.product_published>0'.$additional_condition.' AND b.product_parent_id=0 WHERE a.category_id IN ('.implode(',',$ids).') GROUP BY a.category_id'); } $counts = $database->loadObjectList('category_id'); $this->_getCount($rows,$counts); }
And I think that is that specific query which use a lot of time in your page.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.180 seconds
Powered by Kunena Forum