Keeping your Zen Cart Downloads folder safe

The default folder for Zen Cart downloads is <your_store_root>/download.  The problem with this is that if you have non-free downloads, and some bad guy guesses the names of your zip files, they can just download them for free.

The fix is easy; simply relocate your downloads folder outside of your public_html directory.  So if your DIR_FS_CATALOG entry in includes/configure.php is ‘/home/scott/public_html/shop’, just do this:

  1. Move your /public_html/shop/download folder to /download (i.e. above public_html)
  2. Set DIR_FS_DOWNLOAD to ‘/home/scott’ in includes/configure.php and YOUR_ADMIN/includes/configure.php

Some more details on this are discussed in this Zen Cart tutorial.

Building a static site on Github with Hugo

The cool kids are using Hugo to build static websites, so I wanted to give it a try myself.   It was easy enough to use locally, but the instructions on the website for Hugo hosting on Github pages were too complicated for me.  So I used what I think is a simpler workflow, and documented it in my site’s  Here you go:

  1. Install Hugo.
  2. Use
    hugo new site my-site-name

    to create the site. Change directory to my-site-name.

  3. Grab a template you like from HugoThemes. Create the directory themes and install it there.
  4. Run
    hugo server -w

    to start looking at your site locally. Add content until you’re happy.

  5. Fiddle with config.toml until you’re happy. Remember you have to restart “hugo server” each time you change configuration; the LiveReload doesn’t handle this.
  6. Create a .gitignore and add “public” to it.
  7. Add your site to a new git repository. For reference, mine is
  8. Run

    to generate the final copy of your site. (I assume you have added your template to the config.toml file; if not, you will need to use “hugo -t your-template”.) Change directory to “public”.

  9. Add this directory to a new repository, with the name Again, for reference, mine is
  10. You’re done! Your site will be live shortly at

Looking for broken downloads in your Zen Cart

Zen Cart has a feature called the Downloads Manager (admin->catalog->downloads manager), which allows you to easily spot missing downloadable files.  If the file isn’t present in your downloads directory, the icon goes bright red.

Screen Shot 2015-05-25 at 11.17.39 AM

The problem is, this doesn’t always work.  If you created the file attribute, but forgot to specify the file, the download manager won’t identify the missing file.

If you believe this might be a problem for you, you may do an audit of your database, looking for products with this problem.

Here’s how to do the audit:

1) Go to admin->catalog->option name manager to verify the option id for File Format.  It will normally be “1”.

2) From PHPMyAdmin:

SELECT * FROM `products_attributes` pa where options_id = 1 and not exists (select * from products_attributes_download pad where pa.products_attributes_id = pad.products_attributes_id)

Of course you will need to prefix table names with your prefix if you are using one, and change the options_id value if it’s other than 1.

Once found, you can add back these missing files in the attributes controller (admin->catalog->attributes controller) simply by editing the attribute, and entering the filename at the bottom of the form.

Zen Cart Extended Family – Powerful Cross Selling with Easy Admin

If you want to be able to easily show related items on your Zen Cart product info page, and allow your customers to buy them with a single click (as long as they don’t have attributes), take a look at Extended Family.

It’s like Checkbox Cross Sell, but instead of using the Better Together configuration, it uses its own configuration, which is easily created using its own built-in admin page.

Save for Later documentation fixes released

Zen Cart Save for Later was originally designed to work on the Shopping Cart page of Zen Cart (just the way the Save for Later feature works in Amazon).  People liked it, but also wanted it to be available on the product info page.  So I added instructions on enabling this, but missed a few possible configuration settings so it didn’t always work.  These issues have been fixed in the new release 1.4.1 of Save for Later.