Adding Pages to my site

Creating a new page for your store

You have several options if you want to add a page to your site. Here they are, in increasing order of complexity:

Use EZ-Pages

EZ-Pages are a great way to add new text content to your site. The one restriction they have is that you can’t execute any PHP code on them, but for many situations, this is not required.

Use the built-in extra pages

The built-in extra pages are

You may use these pages to add content to your site.

Turn on creation of links to these pages from Admin > Configuration > Define Page Status, then modify the page content using the Define Pages Editor.

Use a Plugin

This plugin adds six new define pages which can be used just like page_2 .. page_4.

Build a new custom page

A number of files go into building a new page. The best way to create a new page is to use one of these plugins as a starting point:

The latter is somewhat less customizable but contains fewer files.

The advantage of creating a new page is that you can use PHP in the page, which is not an option with EZ-Pages. Being able to use PHP means you can add conditional logic, do database lookups, customize for specific groups or customer characteristics, etc.

Add infrastructure to build multiple pages

Use this plugin as a starting point:

Linking to your New Page

Once you have created your new page, you’ll want to link to it. A few options are:

Direct Access to Files

You may wish to simply provide files (such as PDFs) on your site without requiring the registration and purchase steps associated with paid downloads.

The recommended method of doing this is as follows:

  • Create a new folder at the top level of your cart. Remember that Zen Cart already comes with /docs and /download folders, so choose another name.
  • Prior to populating the folder, create an index.html and .htaccess file that limits access in the folder. You can copy these files from the /download folder and customize as needed.
    Note: If you are using Ngnix or another webserver other than Apache, you will have to make the appropriate security changes for that system.

If what you want to do is associate PDFs with specific products, look at the PDF Attachment in Product Description plugin.




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 July 15, 2021 by Scott C Wilson (780be014).