OpenCart 资源
我正在尝试了解如何使用 OpenCart 构建东西,但他们的文档似乎有点保守。 stackoverflow 社区有阅读材料的建议吗?
这个问题本质上与以下内容相关:
I'm trying to develop an understanding of how to build things using OpenCart, but their documentation seem to bit on the conservative side. Do the stackoverflow community have suggestions for reading material.
This question is in spirit related to:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
首先你需要熟悉 MVC。然后看一下 OpenCart 框架 的解释来更好地理解OpenCart 中的 MVC 实现。
剩下的应该不那么难,只要看一些例子你就会明白了。 这个示例非常适合您入门。它是为培训目的而编写的,所有文件都有很好的注释!要下载该示例,您需要提交订单,然后从“下载”部分下载附件。您还可以在此链接找到更多教程...
First you need to get familiar with the concept of MVC. Then take a look at OpenCart framework explanation to have a better understanding of MVC implementation in OpenCart.
The rest shouldn't be that hard, just go through some examples and you'll get the idea. This example is really good to get you started. It's written for training purpose and all files are well commented ! In order to download the example you need to submit an order and then download the attachment from the "Downloads" section. You can also find more tutorials at this link ...
您可以购买他们的初学者指南 Opencart 初学者指南
You could buy their beginner's guide Opencart Beginner's guide
如果只是为了改变 OpenCart 的主题,那么对于这一点,像 Smarty 这样的任何模板引擎的工作经验都可以证明是有益的。
但如果是关于扩展和修改功能,那么了解整个 MVC 肯定会更有用。
如果您不想花时间首先了解 MVC,那么只需立即深入代码并尝试了解文件是如何加载的(die()、exit() 是最好的方法)。
请注意,无论是 MVC 还是任何其他模式、开放式购物车或任何其他工具/解决方案,掌握它的最有价值的方法是专注于理解引导过程或文件加载机制,这可以通过以下方式实现:逻辑地浏览代码并理解其流程(再次使用 die 或 exit)。
希望这有帮助。
If its only about changing the theme of OpenCart, then for this, working experience with any template engine like Smarty can prove to be beneficial.
But if its about extending and modifying the functionality, then knowledge of MVC as a whole would definitely be more beneficial.
If you don't want to invest time in first understanding MVC, then simply dive into the code straight away and try understanding how files are being loaded (die(), exit() the best means for this).
Note that be it MVC or any other pattern, open-cart or any other tool/solution, the most rewarding way of having a good hold on it is to focus upon understanding the bootstrap process or file loading mechanism and this can be best achieved by going through code logically and understanding its flow (again by using die or exit).
Hope this helps.
我首先学习 MVC 开发框架。如果您了解 MVC 框架是如何构建的,那么您就已经开始了解 Opencart。 Codeigniter 是一个相当简单的 MVC 框架,可以学习,并且有很多资源可以帮助您。
I'd start by learning the MVC development framework. If you understand how an MVC framework is built, then you're already on your way to understanding Opencart. Codeigniter is a fairly simple MVC framework to learn off of and there is lots of resources around to help you out.
我写过一些关于“Opencart 的好资源”的文章在 Opencart 论坛上。请参阅开发参考部分。
I've been wrote something about "good resource for Opencart" on Opencart forum. See developing refference section.
要更改或添加功能,您应该考虑使用 vqmod,它允许您无需修改即可更改内容直接使用 opencart 源代码,如果您进行升级或想要将更改移植到其他 opencart 安装,这是理想的选择。
如果它们特别有帮助,也很高兴与社区分享它们。
For changing or adding functionality, you should consider using vqmod, it allows you to change things without modifying the opencart source code directly, which is ideal if you do upgrades or want to port your changes to other opencart installs.
It is also nice to share them with the community if they are particularly helpful.