After adding this module to our projekt, i discovered some problems with this module and fixed them.

- Added extra header in _zipcart_phpzip() for the right content type "application/zip" so the browser can open it in the right application.

- Fixed a bug that prevented guest users from adding items to their zipcart using AJAX

- Removed $_SESSION from hook_theme and added a content callback in hook_block (fix for issue #1144436: Block's download count doesn't remain on page refresh. )

Comments

Matthias Lersch’s picture

Status: Active » Needs review
Matthias Lersch’s picture

Title: Several bugs solved » Several bugs fixed
Category: bug » task
xurizaemon’s picture

Title: Several bugs fixed » Anonymous users not able to add items to cart via AJAX
StatusFileSize
new545 bytes

Thanks Matthias. Call me OCD if you will but I like one fix per issue :)

I'm going to break your patch into three, move #1144436 there, split the extra header into its own issue, and make this one the AJAX fix.

* #1144436: Block's download count doesn't remain on page refresh. (already existed)
* #1226582: Anonymous users not able to add items to cart via AJAX (this issue!)
* #1228402: Add Content-Type header - open download in correct application (just created)

xurizaemon’s picture

To reproduce this issue (anonymous users unable to add to cart) -

1. Visit site as anonymous user in browser A. Add to cart.
2. Visit site as anonymous user in browser B. Add to cart link will not work, with result "Unable to add the file to your ZipCart".

xurizaemon’s picture

My patch from #3 doesn't seem to fix this issue, though.

Matthias, can you please see if I left some of the changes from your original issue patch behind?

xurizaemon’s picture

Status: Needs review » Needs work

oops

Matthias Lersch’s picture

The patch in #3 is just one part, the basic changes for this problem is in the patch you added unter #1228402: Add Content-Type header - open download in correct application

-function zipcart_filterzip(&$files) {
+function zipcart_filterzip($files) {

xurizaemon’s picture

Status: Needs work » Closed (cannot reproduce)

seems to be working, probably fixed months ago! thanks