简体   繁体   English

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

[英]Where could I find a complete Zen Cart reference for getting item and category info, etc.?

I've been searching everywhere and there seems to be very little about Zen Cart... at least anything much deeper than "install and go". 我到处都在搜索,Zen Cart似乎很少……至少比“安装即用”更深入。 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. 我正在对Zen Cart商店进行外观设计(模板化),但是我想要的设计与当前布局不符,因此我不得不对tlp_header.php,tpl_footer.php,tlp_main_page.php等进行大量更改。

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. 我签出了API文档,但令人困惑。

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. 我意识到这个答复将不会对您有帮助...六个月后,但是无论如何,以防万一它对其他人有所帮助:我同意,如果您不了解Zencart的方式,API文档并不是很有帮助,他们更多参考。

You have some tutorials in the Zencart wiki . 您在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. 另一方面,我的建议是使用其他模板中的代码,尤其是使用Zencart默认模板和/ modules / pages中的header.php文件中的代码。 But even further, I would try to use the Zencart functionality without editing any file first. 但更进一步,我将尝试使用Zencart功能,而不先编辑任何文件。

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? 如果使用类别的cPath调用index.php,您将获得该清单,为什么还要从头开始做所有的麻烦呢?

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. 如果您确实需要将清单包含在其他位置,那么我将开始查看默认模板的/ common文件夹中的“ tpl_tabular_display.php”和“ tpl_columnar_display.php”。 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. 在大多数情况下,SQL调用是在/ includes / modules / pages内的header.php文件或/ includes / modules中的文件中完成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM