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

What if a template file is 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.

So if a referenced template file doesn’t exist, you would create it from the default file.

Example (1.5.8)

To create

includes/languages/english/YOURTEMPLATE/lang.header.php

copy includes/languages/english/lang.header.php to includes/languages/english/YOURTEMPLATE/lang.header.php

Example (1.5.7)

To create

includes/languages/english/YOURTEMPLATE/header.php

copy includes/languages/english/header.php to includes/languages/english/YOURTEMPLATE/header.php

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.

What about language files? (1.5.8 and above)

Language files are very similar. If your language is French, and the instructions say,

Update includes/languages/english/YOURTEMPLATE/lang.checkout_shipping.php

then you would want to update

includes/languages/french/YOURTEMPLATE/lang.checkout_shipping.php

and if that file doesn’t exist, you would create it from

includes/languages/french/lang.checkout_shipping.php

What about language files? (1.5.7 and below)

Language files are very similar. If your language is French, and the instructions say,

Update includes/languages/english/YOURTEMPLATE/checkout_shipping.php

then you would want to update

includes/languages/french/YOURTEMPLATE/checkout_shipping.php

and if that file doesn’t exist, you would create it from

includes/languages/french/checkout_shipping.php

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? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified May 17, 2023 by Scott C Wilson (79c0db2).