Product downloads - usersaynoso/cactus-foundation GitHub Wiki
Half the questions a shop gets asked are already answered in a document somebody has sitting in a folder. The assembly instructions. The dimensions drawing. The washing symbols. The certificate that says the thing is fire-rated. Emailing them out one at a time is nobody's idea of a career.
This module lets you attach those files to a product and give each one a name a human would recognise, and they appear on the product page under a Downloads tab that anybody can help themselves to.
Requires the Shop module.
- Open a product under Shop → Catalogue.
- Go to the Downloads tab.
- Click Add a file and choose one. You can pick several at once.
- Type what each file actually is in the box next to it.
That is the whole job. The tab appears on the product page straight away - there is no layout to edit and no block to drag in. A product with no files has no tab at all, so installing this changes nothing about your shop until you put something in it.
Use the arrows to shuffle the list into the order you want it read in, and Remove to take one down. Removing deletes the file properly rather than merely hiding it, so it stops costing you storage.
Everything on this tab saves the moment you do it. There is no need to press Save afterwards, and nothing is lost by wandering off to another tab.
This is the part worth two minutes of your time.
Your supplier sent you TZ-4491-rev-c-web-FINAL-v2.pdf. Call it Assembly instructions. That is what shoppers see on the page, and - this is the useful part - it is also what the file saves to their computer as. They end up with "Assembly instructions.pdf" in their downloads folder, findable in six months when the shelf finally wobbles.
If you cannot be bothered, the file keeps its original name and the world carries on turning. You just have a page with TZ-4491-rev-c-web-FINAL-v2 on it, and nobody clicks that.
Anyone. No account, no login, no purchase.
That is deliberate, and it is rather the point: these are the things somebody reads before deciding whether to buy. A manual behind a login is a manual nobody reads, and the shopper who wanted to check the dimensions has already gone to look somewhere else.
If what you want is to sell a file - an ebook, a template, a plugin - that is a different thing entirely, and the Shop already does it. Set the product's type to Digital and use its Download tab. Those are delivered after payment, with a link that expires. See the Shop page.
PDFs, Word, Excel and PowerPoint documents, RTF, plain text, CSV, DWG and DXF drawings, JPEGs, PNGs and ZIP files.
Web pages (HTML, SVG and the like) are deliberately not on the list. Handing out a file that a browser will run as a web page from your own address is a security hole rather than a download, so the tab does not offer it.
Each file can be up to 4 MB. We would like to tell you otherwise, but a larger file is turned away by the hosting platform before Cactus gets a look in, and a limit we cannot enforce is a promise we cannot keep.
Most manuals, spec sheets and drawings fit comfortably. A 200-page illustrated catalogue will not. If you have one of those, the usual dodge is to link to it from the product description instead.
(Photographs and 3D models get to skip this queue because they go straight from your browser to your storage. Documents cannot use that road - the bit of Cactus that guards it only recognises images and 3D models, and turns a PDF away regardless. Lifting the limit needs a Cactus update and a Worker redeploy on every site, so for now: 4 MB, said plainly.)
In your media library, filed under Shop / <category> / <product> / downloads - tucked in beside the product's own photographs rather than in some parallel filing cabinet you have to go looking for.
You can see them there like any other file. Deleting one from the library, though, is not the way to take it off the page: use Remove on the product's Downloads tab, which tidies up both.
- A draft product's files are not public. If the product is a draft, or archived, its downloads stop working too - the same way the product page itself disappears. Nothing leaks before you launch.
- Renaming is instant. Change the name and the next person to download it gets the new one. Anyone who already has the file keeps what they got.
- If you sell a digital product that also has literature, you will see two tabs both called Downloads: the Shop's one for the thing they bought, and this one for the free extras. Both work. It is an odd sight, and an uncommon one.