The Cart Blog

Sunday, October 9, 2011

Renaming Zen Cart files for backup

Filed under: That Software Guy,Zen Cart — thatsoftwareguy @ 8:11 am

This is a common problem I see in failed mod installs: incorrectly renaming files you wish to keep as backups.   Zen Cart automatically loads all files ending with the extension “.php” in certain directories (such as includes/functions/extra_functions and includes/modules/order_totals), so you must name your backup files in a way such that they do not end with the extension “.php”.

For example: suppose you want to save a backup copy of the file ot_coupon.php

Good names:

ot_coupon.php.5Oct10
ot_coupon.php.orig
ot_coupon.php.old

Bad Names

5Oct10.ot_coupon.php
orig-ot_coupon.php
old.ot_coupon.php

 

1 Comment »

  1. Amen to this bit of knowledge! I just spent the better part of a day trying to figure out why a recent addon not only failed and crashed parts of the cart, but then continued to cause problems after it was “removed” — I really didn’t remove it,just renamed some of the files in the incorrect manner.

    Comment by John — Friday, December 2, 2011 @ 5:21 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress