[zipcart] Maintains TREE structure of files as they are on webserver. Is there a way to turn this off?

deandec

Joined: 2007-05-17
Posts: 7
Posted: Wed, 2007-06-06 20:58

chaphotos.deandecaussin.com -------------------gallery website

chaphotos.deandecaussin.com/_123phpinfo.php ----link to phpinfo

I have people downloading images with zipcart and the big problem is they just want the images, they dont care about the tree structure/file structure of how I have the pictures organized on the server. It makes is very hard for the user to cascade though all the directories to find the file!!

Any command switches to allow one zip file with all the files at the same directory level?

Thanks for your help.

 
jayhen

Joined: 2007-02-12
Posts: 159
Posted: Fri, 2007-06-08 20:24

There will be a checkbox in the next version of checkout. Watch this space.

 
theb

Joined: 2007-12-03
Posts: 5
Posted: Mon, 2007-12-03 16:25

To make the change yourself, go to the modules/zipcart/classes directory. Edit the ZipCartPlugin.class file. Around line 104, should be the following:
$relativePath = (strpos($path, $albumDir) === 0) ?
substr($path, strlen($albumDir)) : basename($path);

Change this line to be:
$relativePath = basename($path);

This will get rid of the directory structure, and just put the filenames.

Hope this helps.

 
jayhen

Joined: 2007-02-12
Posts: 159
Posted: Thu, 2007-12-06 16:47

Or download the latest version of checkout and untick the box in admin for nested folders on the zip file.