opencart2.3加模板



I know it's bit late to answer but it can be helpful to others.

In OpenCart 2.3.0.2 creating a custom theme is little complex , finally i found this doc here which helped me a lot http://undefined.gr/site/2016/10/09/custom-opencart-2-3-0-2-theme/

To start with copy the default folder found in upload/catalog/view/theme/default to a new folder in the same directory. Name it “mytheme“.

Then copy the theme_default.php file in upload/admin/controller/extension/theme and place it in same directory. Name it “mytheme.php“.

  • Rename the class to (line 2):

ControllerExtensionThemeMyTheme + Replace all “theme_default” text to “mytheme“. Yes there are a lot (197).

Copy the theme_default.tpl in upload/admin/view/template/extension/theme and place it in the same directory. Name it “mytheme.tpl“.

  • Replace all “theme_default” text to “mytheme“. (48)

Copy theme_default.php in upload/admin/language/en-gb/extension/theme and place it in the same directory. Name it “mytheme.php“.

  • Set the new theme’s title in heading_title (line 3) to “My Theme”.

Finally for the thumnail image to show correctly in store settings rename default.png to mytheme.png in upload/catalog/view/theme/mytheme/image Now go into your Administration > Extensions > Extensions and select Themes in “Choose the extension type”. You should be seeing your new theme. Install it with the green (+) button and edit it to enable it. Also ensure you set the correct theme directory whilst editing the theme!

Then in System > Settings edit your store to use your new theme.

That should do it. You can now go ahead and start chopping and changing the default theme

I know it's bit late to answer but it can be helpful to others.

In OpenCart 2.3.0.2 creating a custom theme is little complex , finally i found this doc here which helped me a lot http://undefined.gr/site/2016/10/09/custom-opencart-2-3-0-2-theme/

To start with copy the default folder found in upload/catalog/view/theme/default to a new folder in the same directory. Name it “mytheme“.

Then copy the theme_default.php file in upload/admin/controller/extension/theme and place it in same directory. Name it “mytheme.php“.

  • Rename the class to (line 2):

ControllerExtensionThemeMyTheme + Replace all “theme_default” text to “mytheme“. Yes there are a lot (197).

Copy the theme_default.tpl in upload/admin/view/template/extension/theme and place it in the same directory. Name it “mytheme.tpl“.

  • Replace all “theme_default” text to “mytheme“. (48)

Copy theme_default.php in upload/admin/language/en-gb/extension/theme and place it in the same directory. Name it “mytheme.php“.

  • Set the new theme’s title in heading_title (line 3) to “My Theme”.

Finally for the thumnail image to show correctly in store settings rename default.png to mytheme.png in upload/catalog/view/theme/mytheme/image Now go into your Administration > Extensions > Extensions and select Themes in “Choose the extension type”. You should be seeing your new theme. Install it with the green (+) button and edit it to enable it. Also ensure you set the correct theme directory whilst editing the theme!

Then in System > Settings edit your store to use your new theme.

That should do it. You can now go ahead and start chopping and changing the default theme

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值