Can anyone provide some insight, recommendations, etc... for a way to fix this? Anyone else faced this problem?
Thanks!
Wow! 80,000 products. Great testament for OpenCart!tkambler wrote:I've recently finished installing OpenCart. I now have a product database consisting of 80,000 products.
Probably more a case of "no-one expected OpenCart could hold so many products", than a design issue.JAY6390 wrote:Opencart isn't really designed for holding such large amounts of products
I agree. This is the REAL issue! Using a dedicate host should speed things up.JAY6390 wrote:My biggest question for you is what hosting do you have? shared, vps, or dedicated?
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
1) if you have lots of categories the categories dropdown next to the search can slow things down. you can try removing this.
and
2) add indexes to product_id in product_special, product_review, and product_discount tables. the site where I saw this problem it was mostly from the specials box. I disabled the specials box and the site sped up tremendously, so if you disable specials and the site speeds up try adding the indexes, you'll most likely need them anyways with that many products.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Dedicated hosting. Quad core, 2.4GHz, 4GB Ram, etc...
And yes, there are a ton of categories. 841 to be exact.
Xsecrets: I will followup on your recommendation to add indexes and perhaps hard-code the category drop-down by the search box and get back to you.
After taking one look at OP's db schema, I was able to put together an import process within 30 minutes. The same process for Magento took 12+ hours.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I've got the following from zrxraver over on the Dutch forums:
Caching of categories:
in catalog/controller/common/header.php
Find:
Code: Select all
$this->data['categories'] = $this->getCategories(0);
Code: Select all
$category_tree_data = $this->cache->get('categories.0');
if(!$category_tree_data) {
$category_tree_data = $this->getCategories(0);
$this->cache->set('categories.0', $category_tree_data);
}
$this->data['categories'] = $category_tree_data;
in catalog/controller/product/search.php
Find :
Code: Select all
$this->data['categories'] = $this->getCategories(0);
Code: Select all
$category_tree_data = $this->cache->get('categories.0');
if(!$category_tree_data) {
$category_tree_data = $this->getCategories(0);
$this->cache->set('categories.0', $category_tree_data);
}
$this->data['categories'] = $category_tree_data;
Disclaimer: Use this at your own risk, I have not tested this myself (yet).
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Can anyone provide any insight into what may be happening specifically on the home page that is causing OpenCart to slow down so badly with so many products?
Thank you for all your help!
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I wonder if anyone used open cart with more categories? I have 6000 categories and the site just dies... loads so slow that it can not be used.
You wonder why I have 6000 categories? Well simple:
Car Store:
>>Car brand BMW
>>SUBCATS BMW 1 BMW 2 etc..
SUBSUBCATS Breaks, Parts etc 20 of them
So you can easily run up to 6-10000 categories at which it seems open cart can not work. Or is there anyone who has so many categories and the site still works?
"What is the largest shop so far, any scaling issues?" http://forum.opencart.com/viewtopic.php ... 54#p189354
The extreme slowness for us came from all the calls to getTotalProducts to display the total products in each category. After removing these calls the page load time became reasonable (about 2 secs).
In catalog/controller/common/header.php
search for
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts($data);
$children_data[] = array(
'name' => $child['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Code: Select all
$children_data[] = array(
'name' => $child['name'],
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts($data);
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
and replace with
Code: Select all
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'],
'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
);
Code: Select all
$product_total = $this->model_catalog_product->getTotalProducts($data);
$this->data['categories'][] = array(
'category_id' => $category['category_id'],
'name' => $category['name'] . ' (' . $product_total . ')',
'children' => $children_data,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'])
);
Code: Select all
$this->data['categories'][] = array(
'category_id' => $category['category_id'],
'name' => $category['name'],
'children' => $children_data,
'href' => $this->url->link('product/category', 'path=' . $category['category_id'])
);
Users browsing this forum: No registered users and 277 guests