2

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.

TerranRich
  • 1,251
  • 2
  • 19
  • 35

1 Answers1

1

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.

BenMorel
  • 30,280
  • 40
  • 163
  • 285
AJJ
  • 6,750
  • 7
  • 28
  • 31