Reputation: 35
I have a problem with my ecommerce. I use opencart 1.5.4, and on my website is a lot of products about 30 000 and my eshop is very slow. I tried different tricks but none of this was successful. This is my shop http://mycomp.sk/. Thank you for replies.
Upvotes: 0
Views: 2920
Reputation: 1522
i guess you also have a lot categories for each product. Let try this
open catalog\controller\module\category.php
Search : $total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $category['category_id']));
Replace with $total = '';
and
Search : $product_total = $this->model_catalog_product->getTotalProducts($data);
Replace with $product_total = '';
This is what displays the little number next to the category name showing how many products are in the category. It’s a pretty small feature, which I don’t think adds much to the user experience, but the impact that it is having on page speed is pretty high. On every page load, it is running the getTotalProducts approx 50 odd time
and maybe you need to try this mod(Full Page Cache) and also add indexes to all foreign keys or install this for FREE https://github.com/atomixdesign/opencart-turbo.
Upvotes: 2
Reputation: 11
Check out my post here: https://stackoverflow.com/a/18063515/2653932. If you are using product counts on your site you may want to look at this patch. Can't say for sure if it will work with 1.5.4 but I'll be happy to help modify it if necessary.
Upvotes: 1
Reputation: 27105
I would recommend using: Dedicated server for your PHP files. Dedicated server for mySQL only having phpMyAdmin on it. On the MySQL and PHP, you can use a number of cache plugins in the extension library. You can use Memcache or another accelerator. Cache is a good idea. For a bonus I would also use a CDN.
If you have say, 30,000 products and getting high volume orders - this is a setup I have seen been used for a site: The site runs 5 opencart stores and other sites/apps on the servers. The total orders per day is around 2800 and sometimes with mailers and marketing up to 4000 per day. We use two PHP servers with Rackspace. We use a single MySQL database server (originally in cluster and slave but now just a master) The two PHP servers are cloned and synced. We just load balance our URLs using Dns and Rackspace. Using a CDN has reduced our costs and load times. It is pretty rapid now.
Upvotes: 1
Reputation: 15151
Site speed is dependent on a number of things, the main one being overcrowded servers and poor configuration. If you're unable to pay for top end servers then the best option for smaller stores is something like this pagecache mod - especially when you don't have access to modify apache configurations
Upvotes: 0