Question

“My webshop is quite slow, is there anything I can do to speed it up?”

This question applies to Fortis - Responsive OpenCart Theme

Answer

<p>One common issue about loading time is the built in feature in opencart which counts how many product there are in each category. This can use some resources, especially if you have many categories. If you dont need to show the product count besides the categories, you can inactivate it via System &gt; Settings &gt; your store &gt; Options tab &gt; Product count.</p><p>Even if this feature is inactivated from the admin panel, Opencart will still count the products. To totally remove this feature, open the file: vqmod/xml/fortis_theme.xml</p><p>Find:</p><pre class="prettyprint">$total = $this-&gt;model_catalog_product-&gt;getTotalProducts(array(&#39;filter_category_id&#39; =&gt; $category_3[&#39;category_id&#39;]));<p>Replace with:</p><pre class="prettyprint">$total = 0;<p>Then, in the same file, find:</p><pre class="prettyprint">$total = $this-&gt;model_catalog_product-&gt;getTotalProducts(array(&#39;filter_category_id&#39; =&gt; $category_2[&#39;category_id&#39;], &#39;filter_sub_category&#39; =&gt; true));<p>Replace with:</p><pre class="prettyprint">$total = 0;<p>This will avoid the products from being counted.</p><p>If you are using the category module in the side panel, please also open the file:</p><p>catalog/controller/module/category.php</p><p>Find:</p><pre class="prettyprint">$total = $this-&gt;model_catalog_product-&gt;getTotalProducts(array(&#39;filter_category_id&#39; =&gt; $category[&#39;category_id&#39;]));<p>Replace with:</p><pre class="prettyprint">$total = 0;<p>In the same file, find:</p><pre class="prettyprint">$product_total = $this-&gt;model_catalog_product-&gt;getTotalProducts($data);<p>Replace with:</p><pre class="prettyprint">$product_total =0;<p>&nbsp;</p>
Updating...