Post by nathan.dennis » Thu Mar 10, 2016 8:44 am

Hi,
I'm new to opencart and I'm looking for some guides or documentation on developing a customer theme. All I'm trying to do is change the colours. I have found a few guides but none seem to work with OC2.2 as from what I can find there have been some major changes to themes in this version.

Is there ANY documentation on what is required for OC2.2 themes? I can't find anything that outlines what needs to be done.

I have followed the guide found here ( http://code.tutsplus.com/tutorials/crea ... -cms-21786) but the theme doesn't show up in the list of available themes as suggested in the guide.

Regards
Nathan

Newbie

Posts

Joined
Wed Mar 09, 2016 7:57 pm

Post by kirkhall » Thu Mar 10, 2016 9:35 am

If you are only wanting to change colors of some things in the default template you can do most of those changes in your stylesheet.css.
If I were you and again this is only if you are trying to change colors of the default template I would just get http://www.opencart.com/index.php?route ... n_id=20693.

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by nathan.dennis » Thu Mar 10, 2016 10:24 am

Hi thanks for the fast reply, I would prefer to stay away from an extension when I should be able to modify a custom theme.

Editing the CSS is easy and I could update the default theme css file, but I thought editing the core files was a bad idea, hence the custom theme.

Am I missing the obvious? or is there little to no documentation on creating or modifying a theme?

Newbie

Posts

Joined
Wed Mar 09, 2016 7:57 pm

Post by kirkhall » Thu Mar 10, 2016 10:30 am

I never tried to do a custom theme so I don't know about documentation that might be out there.

I try to keep from changing the core files as well now but just editing the .css is no big deal as long as you save a copy of the original. If you jack it up or need it you will have a copy.

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am

Post by ocart777 » Thu Mar 10, 2016 12:44 pm

nathan.dennis wrote:Hi thanks for the fast reply, I would prefer to stay away from an extension when I should be able to modify a custom theme.

Editing the CSS is easy and I could update the default theme css file, but I thought editing the core files was a bad idea, hence the custom theme.

Am I missing the obvious? or is there little to no documentation on creating or modifying a theme?
so then all you need was duplicate the default theme folder then edit "catalog/view/theme/your_new_theme/template/common/header.tpl" search for "/default/" replace with "/your_new_theme/" after that you can edit the stylesheet.css for your new theme

You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.


OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE


User avatar
Active Member

Posts

Joined
Mon Jun 10, 2013 4:57 pm
Location - Malaysia

Post by nathan.dennis » Thu Mar 10, 2016 2:53 pm

so then all you need was duplicate the default theme folder then edit "catalog/view/theme/your_new_theme/template/common/header.tpl" search for "/default/" replace with "/your_new_theme/" after that you can edit the stylesheet.css for your new theme
I had duplicated the folder structure, but hadn't updated the embedded link to the css file. That did part of the trick. The other part was you can no longer set the theme from the store settings, its now in the extensions section under themes if you are using a theme like this you just have to change the folder of the default theme.

Thanks for the help on this. ;D

Newbie

Posts

Joined
Wed Mar 09, 2016 7:57 pm

Post by wonderland » Thu Mar 10, 2016 10:51 pm

Hello,

I had the same problem untill I stumbled upon this thread.

Sorry for hijacking this a little bit, I followed the same tutorial OP did.

I understand that you can create a new template by creating new folder, that contains the following subfolders - image, stylesheet, template.

And that you can change your template in extensions -> theme, but it seems that this new theme is treated more like a child theme than separate theme. How can I create a completely new theme? Do I need to create an install package?

Also one important question - if you navigate to system->settings->general settings, there is a option "Default layout" and no matter what I choose there, nothing changes in front end, could you please explain this?

New member

Posts

Joined
Wed Jun 15, 2011 8:25 pm

Post by pm-netti » Thu Mar 10, 2016 11:00 pm

nathan.dennis wrote:
so then all you need was duplicate the default theme folder then edit "catalog/view/theme/your_new_theme/template/common/header.tpl" search for "/default/" replace with "/your_new_theme/" after that you can edit the stylesheet.css for your new theme
I had duplicated the folder structure, but hadn't updated the embedded link to the css file. That did part of the trick. The other part was you can no longer set the theme from the store settings, its now in the extensions section under themes if you are using a theme like this you just have to change the folder of the default theme.

Thanks for the help on this. ;D
Theme directory can change admin > extension > theme > theme default

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by bobwal » Fri Mar 11, 2016 12:02 am

Sorry another slight hijack here.
When should you use vqmod? If you're working on a custom theme then I'm guessing there's no need to use vqmod on the theme files?

Thanks

Newbie

Posts

Joined
Mon Feb 08, 2016 6:59 am

Post by ocart777 » Fri Mar 11, 2016 1:02 am

wonderland wrote:And that you can change your template in extensions -> theme, but it seems that this new theme is treated more like a child theme than separate theme. How can I create a completely new theme? Do I need to create an install package?
if you do not want the new theme act like a child theme, them you gonna need to duplicate the following files and named it theme_default2.{format} as example.

Code: Select all

admin/language/your_language/theme/theme_default.php
admin/controller/theme/theme_default.php
admin/view/template/theme/theme_default.tpl
open all the above files(theme_default2 after duplicate) and search for "theme_default" and replace with "theme_default2" without quote. and also for controller file you need to rename the controller class like so "ControllerThemeThemeDefault2"
wonderland wrote: Also one important question - if you navigate to system->settings->general settings, there is a option "Default layout" and no matter what I choose there, nothing changes in front end, could you please explain this?
to tell you the truth, i am not really sure about this. but as describe from the opencart documentation it is use for "The default layout type for the store."

You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.


OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE


User avatar
Active Member

Posts

Joined
Mon Jun 10, 2013 4:57 pm
Location - Malaysia


Posts

Joined
Mon Apr 10, 2017 12:02 am
Who is online

Users browsing this forum: No registered users and 2 guests