Creating a ZenCart Template

Recently I’ve been taking tasks of a masochistic nature.
I’ve got a client who’s using ZenCart. It’s an old, and antiquated PHP-based shopping cart software that isn’t updated anymore, isn’t easy to use, and the list goes on. Either way, we’re comparing options of future cart software choices, and one of the things I mention is that mobile shopping has increased 30% every year and that his site needs to be responsive down to mobile. Showed him what it is, got the “Wow” factor, and all that.

Either way, for some reason I had a late night craving to make a template…for ZenCart. A responsive one, a simple one. Just porting Bootstrap into ZenCart’s system! Or so I thought it’d be a simple one…

Their documentation is extensive, but poorly organized.
Here’s a quick run down on how to make a new ZenCart template…this will be mostly terminal commands, so you’ll need to be able to read that. I’ll give an overview of it all, but I’m not going to detail this extensively like I normally do with things as ZenCart is probably not going to be even heard of in 5 years.

The basis of the following is under the understanding that you’ve already downloaded ZenCart and installed it to your host, and are working in that directory. We’re going to call the new template CUSTOM, using the language ENGLISH, these capitalized items are to be renamed to whatever you want to call your template. So here’s my little quick start batch script sorta thing…
kemo@kemoDesk:/www/zencart/$ cd includes/templates/
kemo@kemoDesk:/www/zencart/includes/templates$ mkdir CUSTOM
kemo@kemoDesk:/www/zencart/includes/templates$ cp -r template_default/* CUSTOM/
kemo@kemoDesk:/www/zencart/includes/templates$ cp -r classic/{template_info.php,css/} CUSTOM/
kemo@kemoDesk:/www/zencart/includes/templates$ cp template_default/templates/tpl_* CUSTOM/templates/
kemo@kemoDesk:/www/zencart/includes/templates$ cd ../languages/
kemo@kemoDesk:/www/zencart/includes/languages$ mkdir {CUSTOM,english/CUSTOM}
kemo@kemoDesk:/www/zencart/includes/languages$ cp english.php CUSTOM/
kemo@kemoDesk:/www/zencart/includes/languages$ cp english/*.php english/CUSTOM/

From there, you’re modify the details in that CUSTOM/template_info.php file with your template name, author name, etc. Once you’ve done that, go into the Admin and switch to this new template to start seeing changes.
One thing to note is that the ZC documentation is so horribly out dated…the template the docs talk about is from 2003. Kinda retro-mod with the flat design I guess, but the colors kill. So instead of basing the template off of template_default, I used classic…
From there it’s just a matter of using a lot of grep and updating tables to divs.

Here are a few places that helped to sort out this information…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.