I don't have the file YOURTEMPLATE/some-name

Zen Cart Template File missing

You’re reading the instructions for a plugin or a FAQ page or a forum post and it tells you to update

includes/templates/YOURTEMPLATE/templates/tpl_product_info_display.php

and you say, “Wait a minute - that file doesn’t exist in my cart!”

First of all, let’s review a few things:

a) The FAQ basic terms explains what YOURTEMPLATE means.

b) The concept of a default file which can be overridden.

c) The FAQ template overrides system explains what template overrides are.

So now you know YOURTEMPLATE is an alias for the name of your template, and you know that template override files are files that are modified to create a custom look for your store.

So if your template is responsive_sheffield_blue, this file would be includes/templates/responsive_sheffield_blue/templates/tpl_product_info_display.php.

If you are using the built in default responsive_classic template, this file would be includes/templates/responsive_classic/templates/tpl_product_info_display.php.

But what if the file still doesn’t exist, even if you now know the real name of the file?

Template files (the ones with YOURTEMPLATE - the template name in their path) are all altered copies of the default file.

How do you find the default file?

a) For files under /includes/templates, the default file is includes/templates/template_default/FOLDER/FILENAME.

b) For all other files, the default file is one level above the template folder.

If the templated file being referenced doesn’t exist in your cart, you can create it by copying the original from the default file.

Learn more about default files

Installing a file

Unless you are creating these files directly on your server, you need to copy these files to your server. Use your FTP tool to connect to your server, then go to your webroot, then to the folder where the file is supposed to exist.

Example:

  • Your webroot is /home/johndoe/public_html
  • Your template is custom
  • The file you are changing is includes/languages/custom/english.php

Steps:

  • Using FTP, connect to YOURSITE.com.
  • Change directories so you get to the webroot.
  • Change directories from there so that you get to the folder for the file you are changing. At this point, you will be in /home/johndoe/public_html/includes/languages/custom
  • Transfer the file.

Here’s what it looks like for a live store. Click the image to make it larger if needed. As you can see, the template is bootstrap and the webroot is /home/thatsoft/public_html.

FTP Using Filezilla




Still have questions? No problem! Just head over to the Zen Cart support forum and ask there.
In your post, please include your Zen Cart and PHP versions, and a link to your site.


Last modified July 6, 2020 by Scott C Wilson (c787136).