In afriad I do not know enough about the core of OpenCart to action this on my own, however I wonder if anyone could help create something which in Magento is very useful
The Magento Example
http://support.raptorcommerce.com/entri ... stom-theme
+ In a Nutshell:
- (Im guessing) in the loader of the template file, you wrap around a inline CSS style with a absolute position, which shows the path to the temaplte
- A setting in the admin panel to enable - disable this.
I think this would be super useful for both experienced users, and esp for beginners.
Any thoughts, or help in where this loader is?
Hopefully I can work on this, and give something back. It is if someone else hasnt already done this!!
Regards
Matt
The Magento Example
http://support.raptorcommerce.com/entri ... stom-theme
+ In a Nutshell:
- (Im guessing) in the loader of the template file, you wrap around a inline CSS style with a absolute position, which shows the path to the temaplte
- A setting in the admin panel to enable - disable this.
I think this would be super useful for both experienced users, and esp for beginners.
Any thoughts, or help in where this loader is?
Hopefully I can work on this, and give something back. It is if someone else hasnt already done this!!
Regards
Matt
http://www.senses.co.uk
Senses Web Soltuions
Latest Releases:
http://www.personalisedcanvas.com/
http://www.stampedelytham.co.uk/
I am looking for more detailed information on the MVC model too. I think there are only a few people in this forum who can actually answer your question. Most of the posts I have been looking through are from people who are interchanging the terms template and skin and since a template is very much different from a skin, most of the posts I have read are useless to me. Here is a very broad informational post about the MVC model:
http://forum.opencart.com/viewtopic.php?f=20&t=4113
I am looking for specific answers as to where to start to make some custom templates but I will probably have to spend a few hours hacking around the directories and files. Good luck.
http://forum.opencart.com/viewtopic.php?f=20&t=4113
I am looking for specific answers as to where to start to make some custom templates but I will probably have to spend a few hours hacking around the directories and files. Good luck.
I wrote a little bit of extra details about MVC a la OpenCart on my blog at http://opencart.hostjars.com. I also made a module starter module for developers which has good comments and instructions for how the M's, V's and C's tie together. It might be helpful.
To the OP - I have seen this requested but I haven't seen anyone create such a thing yet. Usually you can find what you need to overwrite fairly intuitively in terms of the template files. They are all in the catalog/view/theme/<your theme name>/template folder, folder names such as common containing the header and footer and home page templates and others, and other folders containing various other parts. You should be able to find any aspect you're looking for just by poking around.
To the OP - I have seen this requested but I haven't seen anyone create such a thing yet. Usually you can find what you need to overwrite fairly intuitively in terms of the template files. They are all in the catalog/view/theme/<your theme name>/template folder, folder names such as common containing the header and footer and home page templates and others, and other folders containing various other parts. You should be able to find any aspect you're looking for just by poking around.
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
it is not really that hard to create your own template.
You can use the default template to create your own with a few mods.
Download everything from catalog\view\theme\default
So you have the default folder and every other folder/files inside that folder.
Now install a program called Notepad++
Open up every view file and replace any reference to "default" to your new template name.
Now rename the folder default to the same new template name.
Now you have an exact clone of the default template, but it is called something new.
Now all thats left is changing the template image files and editing the css stylesheet to create your unqiue template.
Upload the template back to catalog\view\theme
In admin sttings, set the store template to your new one.
You can use the default template to create your own with a few mods.
Download everything from catalog\view\theme\default
So you have the default folder and every other folder/files inside that folder.
Now install a program called Notepad++
Open up every view file and replace any reference to "default" to your new template name.
Now rename the folder default to the same new template name.
Now you have an exact clone of the default template, but it is called something new.
Now all thats left is changing the template image files and editing the css stylesheet to create your unqiue template.
Upload the template back to catalog\view\theme
In admin sttings, set the store template to your new one.
Have a look at this too
http://www.opencart.com/index.php?route ... path=43_44
section: How to create a new theme
Opencart uses a default theme fallback system - makes life easier when you upgrade
http://www.opencart.com/index.php?route ... path=43_44
section: How to create a new theme
Opencart uses a default theme fallback system - makes life easier when you upgrade
well actually in opencart the idea of a template or a skin or a theme are pretty much interchangeable which may be why you are confused. Opencart does not use any sort of templating system, so you are pretty much just editing php files that happen to have a .tpl extension in the view folders.harryusa wrote:Most of the posts I have been looking through are from people who are interchanging the terms template and skin and since a template is very much different from a skin,
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I guess there are various ideas and meanings to what theme or template is.
To me a template is a cookie cutter, it contains the basic shape of how things look while the theme would be like colors and shapes as in how css zen garden works. In which case the template would be the part they don't want you to touch and the css stylesheet would be the theme.
Using the above, you could theme opencart by just working with the css file however major changes do have to happen in the view .tpl files.
If you know basic php (at least enough to know not to fiddle with stuff in the loops) then you should be able to make your own template.
Things to note is that once you decide that you need to add new variables like text_shop_catch_phrase_into then you will have to add to the language files and the controller.
As for the disable / enable this and that ... still not sure how I feel on that approach. It adds a lot of extra code to IF > THEN > ELSE situations. Besides, you'd need to come up with some kind of jquery gui yui like interface to allow the basic end users drag and drop modules and extensions around if you were going to do it right. But when you really get down to it, you'll change your design around a lot in the beginning that eventually settle to one layout for all the boxes. If that is the case getting a template done right from the beginning would make sense.
If you done templates for oscommerce, you'll be more than able to work with opencart. I was able to jump into the templates after about 10 minutes. I shall not comment on oscommerce
To me a template is a cookie cutter, it contains the basic shape of how things look while the theme would be like colors and shapes as in how css zen garden works. In which case the template would be the part they don't want you to touch and the css stylesheet would be the theme.
Using the above, you could theme opencart by just working with the css file however major changes do have to happen in the view .tpl files.
If you know basic php (at least enough to know not to fiddle with stuff in the loops) then you should be able to make your own template.
Things to note is that once you decide that you need to add new variables like text_shop_catch_phrase_into then you will have to add to the language files and the controller.
As for the disable / enable this and that ... still not sure how I feel on that approach. It adds a lot of extra code to IF > THEN > ELSE situations. Besides, you'd need to come up with some kind of jquery gui yui like interface to allow the basic end users drag and drop modules and extensions around if you were going to do it right. But when you really get down to it, you'll change your design around a lot in the beginning that eventually settle to one layout for all the boxes. If that is the case getting a template done right from the beginning would make sense.
If you done templates for oscommerce, you'll be more than able to work with opencart. I was able to jump into the templates after about 10 minutes. I shall not comment on oscommerce

930sc ... because it is fun!
Arrived here from Google looking for the same thing. After a bit of digging I found that this works. Add this line into system/engine/controller.php just after the $this->output = ob_get_contents(); on (or about) line 65.
The condition there is so that you don't get template paths showing in the admin. Remove it if you need to.
It's not 100% the same as Magento but I'm sure that someone with a bit more CSS wrangling ability can make it work. The biggest problem is that the margin and size of the label bump the theme around a fair bit - this is an issue when debugging a Magento theme also.
A nice next step from here would be to do something where you could then click to edit each template in your browser
Cheers,
- Bob -
Code: Select all
if( strpos( $_SERVER[ 'SCRIPT_FILENAME' ], '/admin/' ) === false )
$this->output = '<div style="margin:2px;border: 1px red solid;display:inline-block;"><div style="float:left;color:white;background-color:red;">' . $this->template . '</div><div>' . $this->output . '</div></div>';
It's not 100% the same as Magento but I'm sure that someone with a bit more CSS wrangling ability can make it work. The biggest problem is that the margin and size of the label bump the theme around a fair bit - this is an issue when debugging a Magento theme also.
A nice next step from here would be to do something where you could then click to edit each template in your browser

Cheers,
- Bob -
Who is online
Users browsing this forum: No registered users and 12 guests