在哪里可以找到用于获取商品和类别信息等的完整 Zen Cart 参考?

发布于 2024-09-03 23:41:41 字数 233 浏览 3 评论 0原文

我一直在到处搜索,但关于 Zen Cart 的内容似乎很少……至少比“安装并运行”更深层次的内容。我正在对 Zen Cart 商店进行剥皮(模板化),但我想要的设计不适合当前布局,因此我必须对 tlp_header.php、tpl_footer.php、tlp_main_page.php 等进行大量更改是否

有参考资料显示如何执行基本操作,例如获取所有类别及其缩略图、列出类别中的所有项目等?我查看了 API 文档,但它非常令人困惑。

I've been searching everywhere and there seems to be very little about Zen Cart... at least anything much deeper than "install and go". I'm skinning (templating) a Zen Cart store, but the design I want doesn't fit in with the current layout, so I've had to make extensive changes to tlp_header.php, tpl_footer.php, tlp_main_page.php, etc.

Is there a reference out there that shows how to do basic things such as grab all of the categories and their thumbnails, list all items in a category, etc.? I checked out the API Documentation but it's confusing as hell.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

栖迟 2024-09-10 23:41:41

我意识到这个回复不会帮助你......六个月后,但无论如何,以防万一它对其他人有帮助:我同意,如果你还不知道 Zencart 的方法,API 文档不是很有帮助,他们更有参考意义。

您可以在 Zencart wiki 中找到一些教程。它们都不是您需要的完整解决方案,但是从这里和那里您可以学到很多东西(至少我做到了)。

另一方面,我的建议是使用其他模板中的代码,特别是 Zencart 默认模板和 /modules/pages 中的 header.php 文件。但更进一步,我会尝试使用 Zencart 功能,而不先编辑任何文件。

例如,如果您需要列出所有类别及其缩略图,那么您已经拥有该功能。如果您使用类别的 cPath 调用 index.php,您将获得该列表,为什么要从头开始做这些麻烦事呢?

如果您确实需要将列表包含在不同的位置,我将开始查看默认模板的 /common 文件夹内的“tpl_tabular_display.php”和“tpl_columnar_display.php”。他们分别完成输出产品和类别列表的所有工作。大多数时候,SQL 调用是在 /includes/modules/pages 内的 header.php 文件或 /includes/modules 中的文件中完成的。

I realise this reply won't help you... six months later, but anyway, just in case it helps someone else: I agree, the API docs are not very helpful if you don't already know your way around Zencart, they are more of a reference.

You have some tutorials in the Zencart wiki. None of them are a complete solution to what you need, but from bits from here and there you can learn quite a lot (i did at least).

On the other hand, my advice would be to use code from other templates and specially from the Zencart default template and the header.php files in /modules/pages. But even further, I would try to use the Zencart functionality without editing any file first.

For instance, if you need to list all categories and their thumbnails, you already have that functionality. If you call index.php with a cPath of a category, you will get that listing, why going for all the trouble of doing it from scratch?

If you really need to include the listing in a different place, I would start my looking at "tpl_tabular_display.php" and "tpl_columnar_display.php" inside the /common folder of the default template. They do all the work of outputting the listings of products and categories respectively. And most of the time, the SQL calls are done in the header.php files inside /includes/modules/pages or the files at /includes/modules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文