Layouts for OpenCart 1.5x, what to do with them?

Posted by Flo on 31 Aug 2011

One of the main features of the new OpenCart 1.5x is that it offers Multiple Layout System. This means that you can assign a different layout for every page if you want too. These layouts are fully customizable or if you want, too you can create your own layouts. Due to these things, you can be truly creative and you can create complex online stores. Some are saying that OpenCart is the best open source system for ecommerce and they are probably right, especially now with the latest add-ons. However, if for the more experimented users this is a truly interesting idea, for the rest, those who are beginners it can create some discomfort, because they can be stuck in the editing process. If you are not, sure, that you can handle so much editing you have two options. First, the easy one is to ask for professional help. For the right price, you will have your desired design in a short time but you will have to make a small investment. If not, you can still keep only one layout as the previous versions used to have. In time, as soon as you feel confident with your skills you can add one layout at a time.
How to design layouts?
A new feature in 1.5.x is the layout designer, one of the most powerful features that you can have. Due to its powerfulness, it can become a little bit confusing if you do not know how to do it. As a first exercise for you, you can start editing the default layouts that you have. This way you can see what are the changes that you can do before making the changes in the real situation. Layouts refer to how the modules are organized out on the page. Now, if you have more layouts you have to add separate modules for each and one of them. This can be interesting because you can add the same module in different locations, depending on your needs. Now, let us start with the practical steps that you have to follow.
First, you have to go to System-Design-Layouts and then, edit the "Account" layout. Do not forget that it shows the Store "default" which is used for multi-store, and the route is "account/".This means that for any page that has the "index.php?route=account/xxx" it will use this layout for that. You can add additional routes to this to use the same layout as well if you like. You can even use an empty route value to make ALL routes use this layout (as long as you do not have the route listed in another layout).
Having all features you could either keep all these individual routes or you can get rid of them and keep only a few like "Default" and "Checkout".
As any other thing, this feature has advantages and disadvantages as well. For example, if you have 10 layouts and you want to have the same module on eight of the layouts, you have to add the module 8 times, and set the different layout for each. Developers are recognizing that this feature is not fully completed, and some improvements can appear in the future. However, until them you have to deal with it.