Hi,
I added two basic field field formatters to make it easier to implement this module in D7. These should work on the node page and in views.
Zipcart Basic Link
Zipcar Table of Files

In addition I added functionality to remove an item from the cart by clicking the zipcart link again. I also updated the jQuery to make this functionality more obvious. It still needs some work but here it is if anyone is interested in taking a look. I'll likely improve this a bit more this week when I get some time.
*Known issue, the counter doesn't seem to be updating sometimes when an item is removed.
-Time
Comments
Comment #1
Haiping commentedHi,
The patch works great, and I fixed the "counter issue", just change the two line code "unset($_SESSION['zipcart']['files'][$path_key]);" to "array_splice($_SESSION['zipcart']['files'], $path_key, 1);" located in function zipcart_remove_file_to_cart;
Comment #2
xurizaemonThanks TimeFor, appreciated. This doesn't apply currently.
If you reroll this please include Haiping's amendment above, omit the fix for #1085652: Drupal filepath in JS incorrect if Drupal not installed to site root and .info changes, and check any whitespace changes against coding standards?
"zipcart_remove_file_to_cart" should be "zipcart_remove_file_from_cart" also.
Comment #3
timefor commentedI got back around to updating this. This was taken off the current 7.x-1.x-dev. It adds field formatters for files and images plus it provides the ability to click the download basket link again to remove the file. I included the file count fix from above.
Comment #4
m.zerres commentedHow your zipcart-block-downloads.tpl.php look like, to print the output this way? Thanks!
Comment #5
timefor commentedThe zipcart-block-downloads.tpl.php is only for the My Downloads block. It doesn't format the "add to basket" links. I did not change the template at all.
-Time
Comment #6
timefor commentedI'm back working on this module again and I've made a few improvements since my last posted patch. I think these might be general enough improvements that might benefit others.
I've added a number of fixes and re-rolled patches from that lastest 7.x-1.x-dev
Since there was so much happening I did this in 4 commits and ended up with 4 patches. Sorry.
- Time
Comment #7
xurizaemonLooks awesome TimeFor, thanks for working on this.
As you say, there's a lot happening there. It's easier for this maintainer to assess four issues and four patches than one which lumps them all together. Happy to look at this if you supply a patch for this issue (#1579282: D7: Added Remove Item from Cart / File Field Formatters) here, and add other changes as patches to separate issues.
Comment #8
oakulm commentedHi
Could you please add example on how to use theme() after applying your patches ? I think this changes the default behaviour so much that documentation would be great
Comment #9
oakulm commentedOk just to clarify for everyone after havin used many hours on this.
Drupal 7 zipcart theme after these patches is :
So it's not "filename" it's "file"
Comment #10
fernando vesga commentedHi,
i'm using this module in this way.
I build a view, and i add a global custom text field which i output as a link with this path:
/zipcart/add/sites/default/files/[field_media_image_1]?destination=media-library (media-library is my images page)
[field_media_image_1] is the image to download, after the patches, it works fine
but once i applied all these patch, no images were added to the basket, so i think my path is no working any more.
Why? I think i'm missing something
thanks
Comment #11
simonbcfa commentedPossibly a silly question, how do i get this page to show up? (see image, same as above)
I have created a view and added the filenames (as links) with the class and prefix, so when clicked it is added to the downloads block,
I have added the patches, and l would like to be able to see each download with the option to add and delete files
Comment #12
broonHey, how is the current status of this project?
Last dev release is from 2013 and last issue queue action was more than 7 months ago. I stumbled upon this module as it has the basic functionality of what my client is looking for but I would need to make major changes to meet my clients needs. As this might be an appreciated development for this module (2.x maybe?), I am asking for the status and also if co-maintainers would be accepted.
Changes I would want to incorporate are (1) this thread's field handlers, (2) checkboxes instead of links to add/remove files to basket, (3) designated page to view current basket's content (and modify content) as well as (4) an extended admin interface to allow for more features and settings (e.g. remove links to original file, set a name for the basket like "portfolio" or "info brochure" including translation settings.
Also, I'd like to collect file ids (fid) instead of paths and eventually create entities out of collections for later reuse by other users.
Comment #13
xurizaemon@Paul, I'm happy to consider contributions and co-maintainers based on quality contributions.
Project status is: I created this project for a specific client a while back, and am not currently using the functionality myself. I'm not opposed to this functionality, think I just didn't have time to review all the changes it introduced.
Please do use consider using this module as a starting point, and I'll do my best to help get improvements committed.
Comment #14
broonPatches have been provided quite some time ago, I have been using my "ZipCart 2" module in production for more than 8 month now and consider it to be stable.
See my comment in my main extension issue thread to learn more about DocBinder, my successor module of ZipCart (basically it's ZipCart 7.x-2.x).