OC 4.0.2.3, Stock theme (but CSS modified - I know, that was wrong of me)
Greetings all,
I am requesting some guidance with saving the default OpenCart theme (all the files related to the theme) as a separate theme. After some tinkering with the default theme I ended up with something decent in my opinion. I now want to copy the changes to a “new” theme set. After reading this forum and doing some research on the internet, I realize that amendments to the core files is a big no-no!!
In the spirit of compliance and to show my commitment to OpenCart (currently have Version 4.0.2.3 installed) I tried to separate my changes from the core files but failed miserably in my attempts to understand the extension concepts.
Changes made includes, improvements to the search function, changes to the StyleSheet to ensure all product-thumb columns are of equal length, the product/product page have some cosmetics changed and the UPC is now included in the details list, and other “look and feel” amendments.
I am committed to OpenCart now, and would like to be able to update my installation in future without loosing any of my work done.
You can find the installation at https://diy.web.za (comments are welcome - good or bad, I view all comments as positive input.
Did you actually modify any of the template files? Or did you just add CSS?
If you are just using CSS, then a far easier solution is to create a custom stylesheet that has all your CSS and then add a link to that in the header.twig file. That way it only requires 1 line of code to activate all your changes if you update OpenCart. (If you use vQmod to add the line then it will automatically add it for you if you update OpenCart.)
If you modified the template files but the changes aren't extensive, I would again recommend using vQmod. That avoids having to install and maintain a completely separate theme. If you haven't ever used vQmod you can read more about it here:
https://github.com/vqmod/vqmod
If you want to actually create your own theme then it is indeed a bit complicated in OpenCart 4.0 versions. I would recommend looking at the built-in OpenCart Theme Example in Extensions > Installer. That should hopefully give you an idea of how it's structured.
If you are just using CSS, then a far easier solution is to create a custom stylesheet that has all your CSS and then add a link to that in the header.twig file. That way it only requires 1 line of code to activate all your changes if you update OpenCart. (If you use vQmod to add the line then it will automatically add it for you if you update OpenCart.)
If you modified the template files but the changes aren't extensive, I would again recommend using vQmod. That avoids having to install and maintain a completely separate theme. If you haven't ever used vQmod you can read more about it here:
https://github.com/vqmod/vqmod
If you want to actually create your own theme then it is indeed a bit complicated in OpenCart 4.0 versions. I would recommend looking at the built-in OpenCart Theme Example in Extensions > Installer. That should hopefully give you an idea of how it's structured.
Thank you Johnathan, that’s exactly what I was looking for.
I only made some minor changes to actual code. The bulk of the changes were done using CSS.
I will look at both your suggestions but for now I am favoring the VQMOD.
I’ll post back here when I’m done experimenting.
Greetings,
I only made some minor changes to actual code. The bulk of the changes were done using CSS.
I will look at both your suggestions but for now I am favoring the VQMOD.
I’ll post back here when I’m done experimenting.
Greetings,
https://diy.web.za (OPENCART VERSION 4.0.2.3)
Who is online
Users browsing this forum: No registered users and 1 guest