Posted In: Tutorials


How to change number of products in one row in the category page

May 26, 2015 - By 

The default theme of OpenCart 2 is great! It looks responsively in all devices.
But there are some parts we can not customize easier. I have seen many questions related to how to change number of products in one row in the category page. You will like the solution below.
Step 1: Install my free extension Custom JavaScript.

Step 2: Add code below to it

It’s all. You can see it in action here:


How to change language from a url link in OpenCart 2

April 23, 2015 - By 

Although the built-in language selection in OpenCart close to perfect, If you need a language switcher extension for any text anywhere on the site, here are simple code to create links that direct users to the store in a specific language.

Firstly, open file in catalog/controller/module/language.php.

And add this code before line 4:

Now you may test your language in URL. If you have English and Spanish on your site and you would use: (for English) or (for Spanish)


How to increase number of categories in autocomplete box

April 7, 2015 - By 
category autocomplete

In this post, we will continue to improve OpenCart 2 with a small trick. Did you encounter a case when you want to select categories for product but the autocomplete box only shows 5 categories like the image below?

We will show you how to increase the number of categories in the autocomplete box. It is a easy step.

You can go to file admin/controller/catalog/category.php, find

and change 5 to number of categories you want to display.

For example,



How to display module on all layouts in OpenCart 2

March 14, 2015 - By 

OpenCart 2 has new layout system. It allows you to display modules in layout easier. But it has a weakness.

If you want to display module, the Category module for example, in all pages, you have to edit each layout and add module to them.

It is time-consuming. To solve it, viethemes has just create a extension All Layouts. It allows to add module in one layout to show in all pages.

You can see the extension in details on All Layout by viethemes.

If you have any question about the extension, please don’t hesitate to contact us via email:


Fix messing style in admin panel in OpenCart 2

February 7, 2015 - By 

OpenCart 2 is really cool. But it still have some bugs which cause heache for us a lots. One of bugs is messing style in admin panel look like images below.

Login page

Dashboard page

Don’t worry about that. In this post, I will show you how to fix this problem. Please follow the solution below:

Step 1: Edit the file admin\view\template\common\header.tpl

Step 2: Find code

and replace width

 Step 3: Recheck your admin panel

Please note that this problem will be fixed in the next version of OpenCart.


Change default product view from grid to list in OpenCart 2

February 7, 2015 - By 

OpenCart 2 has two product view type: grid and list in listing page. It is convenient for customers to see products in your store. By default the products will be display as grid. But if you want to display products as list by default, OpenCart does not have option to do that.

In this post, I will show you how to change default product view from grid to list.

Step 1: Install our extension Custom JavaScript

Step 2: Add code below to extension Custom JavaScript:

 Step 3: Go to one category in front-store to check it.

You can see it in action here:

Hope this post will help you to improve your store better.