问题
i'm starting today with theme development in OpenCart 2.2 and i'm following this article:
http://code.tutsplus.com/tutorials/create-a-custom-theme-with-opencart-introduction--cms-21786
Wich uses the 1.5.6.1 version of opencart. (I can't find nothing about this for version 2.2, so i assumed it must be the same).
As a i understand we should create the theme directory in catalog/view/theme. For test pourposes i created a "customtheme" directory and copied the dir structure from the default theme.
The problem is that when i go to dashboard -> settings -> general -> Theme, the selectbox doesn't show the new theme i created.
What am i doing wrong? Should i just modify the default theme? it doesnt seem to be the best path to follow.
Thanks.
回答1:
I had the same issue when duplicating the default theme into a folder named duplicate, so I looked into the code. The admin extension for theme actually looks for a controller for the new theme which I didn't have; so what I did were
Now if you look into the Extensions/Modifications/theme, you will see your new theme and it should so also be ready to be updated under settings
回答2:
I had the same problem, the custom theme was not available in the dashboard -> settings -> general -> Theme. I found a detailed solution here: http://undefined.gr/site/2016/10/09/custom-opencart-2-3-0-2-theme .
回答3:
You should paste all the files from catalog/view/theme/default/template
into catalog/view/theme/default/customtheme
. The template
folder should be present there.
回答4:
As a newbie in opencart who got into this problem after watching the tutorial and downloading opencart 2.3.x, I read that they moved the theme changing thing to
Extensions >> Extensions >> Themes (in the drop down menu) >> Edit >> Theme Directory
.
Hope this helps a future theme creator who comes here all confused.
来源:https://stackoverflow.com/questions/36137603/php-opencart-2-2-0-creating-custom-theme