Quantcast
Channel: Phoca Forum
Viewing all articles
Browse latest Browse all 1965

Phoca Cart • Phoca Cart Download Options

$
0
0
Hello everyone,

I tried to understand how downloadable products work in Phoca Cart but got a bit confused.

My goal is to build an ebook shop where each product has three ebook formats (EPUB, MOBI, AZW3). After purchasing a book, the customer should be able to download the format required for their ebook reader.

I added a product and selected Digital (Downloadable) Product as the product type. Then, I went to 'Download Options', uploaded a file, and added two more additional files. This process was a bit tricky because EPUB had the correct MIME type, but MOBI and AZW3 were detected as application/octet-stream. I set 'Ignore File Types Checking' to Yes, but apparently, this does not apply to MIME types, only to the file extension filter.

So I set application/octet-stream as the MIME type, which allowed me to upload them to the server. However, I was not able to download them. After some troubleshooting, I realized that unpublished items were created in the 'Downloads' menu item, so I published them. This allowed me to download the files, except for one, which had a character difference between the actual filename and the filename stored in #__phocacart_products.download_file.

I wanted to debug this further, so I deleted all downloads from 'Downloads'. However, when I opened the product again, the downloadable entries were still there, but I was unable to download them from the frontend, even though the files were still on the server. I removed all additional downloads but couldn't remove the main download file, as there was only a 'Select file' option. After some time, I realized that even though the 'Download file' field has a chevron, similar to a <select> element, it is actually a text input, so I was able to modify or clear the input.

After that, I deleted the files via FTP and re-uploaded them using the product's 'Download Options' tab. However, my 'Downloads' list (administrator/index.php?option=com_phocacart&view=phocacartdownloads) does not show any available downloads.

Have I missed something? :)

Thank you in advance.

PC 5.0 beta 99

Statistics: Posted by keep2000 — 25 Feb 2025, 18:32



Viewing all articles
Browse latest Browse all 1965

Trending Articles