PHP/OpenCart 2.2.0-创建自定义主题 [英] PHP / OpenCart 2.2.0 - Creating custom theme
问题描述
我今天开始在OpenCart 2.2中进行主题开发,并且关注本文:
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使用opencart的1.5.6.1版本. (对于2.2版,我对此一无所获,所以我认为它必须相同).
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).
据我了解,我们应该在catalog/view/theme中创建主题目录.为了进行测试,我创建了一个"customtheme"目录,并从默认主题复制了dir结构.
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.
谢谢.
推荐答案
将默认主题复制到名为 duplicate 的文件夹时,我遇到了同样的问题,因此我研究了代码.主题的admin扩展实际上是为我没有的新主题寻找控制器.所以我所做的是
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
这篇关于PHP/OpenCart 2.2.0-创建自定义主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!