{"id":15145613,"url":"https://github.com/pixel-open/prestashop-product-files","last_synced_at":"2026-02-08T22:04:07.391Z","repository":{"id":190643974,"uuid":"683025565","full_name":"Pixel-Open/prestashop-product-files","owner":"Pixel-Open","description":"An easy way to attach files and documents to the product (multi-languages, multi-shops).","archived":false,"fork":false,"pushed_at":"2024-10-06T21:47:34.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T23:37:49.793Z","etag":null,"topics":["files","prestashop","prestashop-module","product"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pixel-Open.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-25T12:22:25.000Z","updated_at":"2025-03-18T06:56:26.000Z","dependencies_parsed_at":"2023-08-25T18:59:36.180Z","dependency_job_id":"a6a2b96e-74a8-4f17-9b0c-0064e98e8751","html_url":"https://github.com/Pixel-Open/prestashop-product-files","commit_stats":null,"previous_names":["pixel-open/prestashop-product-files"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Pixel-Open/prestashop-product-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-product-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-product-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-product-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-product-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pixel-Open","download_url":"https://codeload.github.com/Pixel-Open/prestashop-product-files/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-product-files/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269673615,"owners_count":24457162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["files","prestashop","prestashop-module","product"],"created_at":"2024-09-26T11:41:15.913Z","updated_at":"2026-02-08T22:04:07.386Z","avatar_url":"https://github.com/Pixel-Open.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prestashop Product Files\n\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-green)](https://php.net/)\n[![Minimum Prestashop Version](https://img.shields.io/badge/prestashop-%3E%3D%201.7.6.0-green)](https://www.prestashop.com)\n[![GitHub release](https://img.shields.io/github/v/release/Pixel-Open/prestashop-product-files)](https://github.com/Pixel-Open/prestashop-product-files/releases)\n\n## Presentation\n\nAn easy way to attach files and documents to the product (multi-languages, multi-shops).\n\n* Add files to the product in the admin. Multi-shops and multi-languages compatible.\n* Display files on the frontend with a widget.\n\n![Product files in admin](screenshots/product-files-admin.png)\n\n![Frontedn widget files display](screenshots/frontend-widget.png)\n\n## Requirements\n\n- Prestashop \u003e= 1.7.6.0 / Prestashop \u003e= 8.0 / Prestashop \u003e= 9.0\n- PHP \u003e= 7.4.0\n\n## Installation\n\nDownload the **pixel_product_files.zip** file from the [last release](https://github.com/Pixel-Open/prestashop-product-files/releases/latest) assets.\n\n### Admin\n\nGo to the admin module catalog section and click **Upload a module**. Select the downloaded zip file.\n\n### Manually\n\nMove the downloaded file in the Prestashop **modules** directory and unzip the archive. Go to the admin module catalog section and search for \"File\".\n\n## Configuration\n\n### Admin\n\nOn the product page in admin, select \"Modules\", then \"Configure\" for the \"Product Files\" module.\n\n![Product files](screenshots/product-files-empty.png)\n\nClick \"Add a file\" to attach a file to the product.\n\nWhen the shop is multi-shops or multi-languages, the file will be assigned to the current shop in the current language, except if the \"Available in all shops/languages\" option is checked.\n\n![Product files](screenshots/product-files-add.png)\n\nThe title and description fields are localizable.\n\n### Widget\n\nIn the product page template, add the following Widget:\n\n```smarty\n{widget name='pixel_product_files'}\n```\n\n**Widget options:**\n\n* **id_product:** Force the display for the given product id\n* **id_shop:** Force the display for the given shop id\n* **id_lang:** Force the display for the given language id\n* **template:** Custom template path\n* **icons_path:** Custom icon images base URL\n\nExample:\n\n```smarty\n{widget name='pixel_product_files' id_product='1' id_lang='1' id_shop='1' template='module:pixel_product_files/product-files.tpl' icons_path=\"`$urls.base_url`img/file-icons/\"}\n```\n\nWith `product-files.tpl` in `themes/{themeName}/modules/pixel_product_files/product-files.tpl` directory.\n\n### Template\n\nIn a custom template, browse the files as follows:\n\n```smarty\n{foreach from=$files item=file}\n    {assign var=\"extension\" value=$file-\u003egetFile()|pathinfo:$smarty.const.PATHINFO_EXTENSION}\n\n    File URL: {$path.docs}{$file-\u003egetFile()}\n    Icon: {$path.icons}{$icons[$extension]}\n    Title: {$file-\u003egetTitle()}\n    Description: {$file-\u003egetDescription()}\n{/foreach}\n```\n\n### Icons\n\nFrontend file icons are divided into several categories:\n\n| Category     | Icon             | File extensions                                            |\n|--------------|------------------|------------------------------------------------------------|\n| Document     | document.png     | pdf, odt, doc, opt, docx, rtf                              |\n| Table        | table.png        | csv, ods, xls, xlsx                                        |\n| Presentation | presentation.png | pptx, pptm, ppt, odp                                       |\n| Image        | image.png        | png, gif, svg, webp, jpeg, jpg, bmp, avif, apng, ico, tiff |\n| Video        | video.png        | avi, mp4, m4v                                              |\n| Audio        | audio.png        | mp3, ogg, flac, wav, m4a, wma, aac                         |\n| Archive      | archive.png      | zip, rar, gz, tar, bz2, xz, 7z                             |\n\nOther files extension are not allowed.\n\nSet you own icon files with the `icons_path` option:\n\n```smarty\n{widget name='pixel_product_files' icons_path=\"`$urls.base_url`img/file-icons/\"}\n```\n\nThen add icons in the `img/file-icons` directory:\n\n* /img/file-icons/document.png\n* /img/file-icons/table.png\n* /img/file-icons/presentation.png\n* ...\n\nIn the template, display the icon as follows:\n\n```smarty\n{foreach from=$files item=file}\n    {assign var=\"extension\" value=$file-\u003egetFile()|pathinfo:$smarty.const.PATHINFO_EXTENSION}\n    {if isset($icons[$extension])}\n        \u003cimg src=\"{$path.icons}{$icons[$extension]}\" alt=\"{$file-\u003egetTitle()}\" /\u003e\n    {/if}\n{/foreach}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixel-open%2Fprestashop-product-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixel-open%2Fprestashop-product-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixel-open%2Fprestashop-product-files/lists"}