The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
617 Ready
473 Need Help
🏆 Leaderboard
Actively Maintained v1.0.4

Product Attachments for Magento 2

mage2kishan/module-product-attachments

Attaches downloadable files and external links to products, categories, and CMS pages with a centralized file manager, version control, customer-group access control, download tracking, and an embeddable widget. Works on Hyva and Luma storefronts.

24
Downloads
Below average
0
GitHub Stars
Today
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.4 on Magento 2.4.9
Jun 18, 2026
v1.0.3 on Magento 2.4.9
Jun 7, 2026
v1.0.0 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Product Attachments for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Magento 2 Product Attachments: Files, Links and Documents on Products, Categories and CMS Pages (Hyva + Luma)

Attach files, links, and documents to any product, category, or CMS page in Magento 2. Panth Product Attachments gives merchants a centralized attachment manager with file versioning, attachment types, customer group access control, download analytics, email notifications on download, a reusable widget, and native templates for both Hyva (Alpine.js) and Luma.

Product page: kishansavaliya.com/magento-2-product-attachments.html


Quick Answer

What is Panth Product Attachments? It is a Magento 2 extension that lets you attach downloadable files (PDFs, specs, manuals, ZIPs) or external links to products, categories, and CMS pages. Customers see and download the files directly from the product page, category page, or CMS page.

What does it add to my store?

  • A centralized file manager in the admin where you upload files once and assign them to many products, categories, or pages.
  • Attachment types (PDF, manual, warranty, spec sheet, and custom types you define) with icons.
  • File versioning so you can push a new version without breaking existing download links.
  • Download analytics with a log of who downloaded what and when, visible in the admin.
  • Customer group access control and an option to block guest downloads.
  • Email notifications sent to an admin address when a file is downloaded.
  • A Magento widget so you can embed an attachments list anywhere in CMS content.

Which themes are supported? Both Hyva (Alpine.js, no jQuery) and Luma. The correct template is picked automatically based on the active theme.

What does it need? Magento 2.4.4 to 2.4.8, PHP 8.1 to 8.4, and the free mage2kishan/module-core package.


Need Custom Magento 2 Development?

Get a free quote for your project in 24 hours for custom modules, Hyva themes, performance work, M1 to M2 migrations, and Adobe Commerce Cloud.

Kishan Savaliya

Top Rated Plus on Upwork

100% Job Success • 10+ Years Magento Experience Adobe Certified • Hyva Specialist

Panth Infotech Agency

Magento Development Team

Custom Modules • Theme Design • Migrations Performance • SEO • Adobe Commerce Cloud

Visit our website: kishansavaliya.com  |  Get a quote: kishansavaliya.com/get-quote


Table of Contents


Who Is It For

  • Electronics and appliance stores that need to ship user manuals, spec sheets, firmware downloads, or warranty PDFs with every product.
  • Fashion and apparel stores that want to add size guides, care instructions, or lookbooks to category or CMS pages.
  • B2B and wholesale stores that serve price lists, contracts, or dealer documents only to logged-in customers of a specific customer group.
  • Any store where the product detail page needs supporting documents that help shoppers make a buying decision before adding to cart.
  • Content-heavy CMS pages (FAQs, policy pages, landing pages) that benefit from downloadable resources.

Key Features

Attach Anywhere

  • Products - attach unlimited files or links to any product type.
  • Categories - add category-level files like brochures, lookbooks, or size charts.
  • CMS Pages - enrich About, FAQ, policy, or landing pages with downloadable resources.
  • One attachment, many entities - assign one file to multiple products, categories, or pages without duplicate uploads.

Centralized File Manager

  • Upload once, reuse everywhere - a single file library is shared across all attachment records.
  • File versioning - push a new version of a file while keeping old download history intact. Version changelog text is stored per version.
  • Unused files manager - the admin shows files that are uploaded but not assigned anywhere, so you can clean them up.
  • Per-file download counter - each file and each version tracks its own download count.

Attachment Types

  • Built-in type system - create and name your own types (PDF, manual, warranty, spec sheet, video, or any label you want).
  • Type icons - each type gets an icon class for visual display in the frontend list.
  • Store-view scoped types - types can be enabled per store view.

Customer Group Access Control

  • Access levels per attachment - public (any visitor), logged-in only, or purchasers only (controlled by the access_level column in the database).
  • Customer group IDs - attach a comma-separated list of allowed group IDs per attachment for fine-grained B2B gating.
  • Guest download toggle - a global configuration switch to allow or block guest downloads.

Download Analytics

  • Full download log - every download records attachment ID, version, customer ID, customer email, IP address, user agent, and timestamp in the panth_product_attachment_download_log table.
  • Analytics admin grid - go to Panth Infotech → Product Attachments → Download Analytics to see all download activity.
  • Configurable log retention - set how many days to keep logs. A cron job cleans up old records automatically.

Email Notifications

  • Notify on download - get an email every time a file is downloaded.
  • Configurable recipient - enter any email address to receive the notifications.

Frontend Display

  • Show on product pages - a dedicated block on the product page lists all attachments for that product.
  • Show on category pages - attachments assigned to the category appear on the category page.
  • Show on CMS pages - attachments assigned to a CMS page appear inline.
  • Configurable view mode - choose between available view modes per the default_view_mode setting.
  • File size display - optionally show each file's size next to the title.
  • Description display - optionally show a short description for each attachment.
  • File preview - enable a preview button for PDFs and images.

Widget

  • Drag-and-drop widget - place an attachments block on any CMS page, block, or layout position through the standard Magento widget interface.

Hyva and Luma Ready

  • Native Hyva templates built on Alpine.js, with no jQuery, RequireJS, or Knockout.
  • Native Luma templates using standard Magento frontend conventions.
  • Theme is detected for you through Panth\Core\Helper\Theme, no manual switch needed.
  • Custom CSS support - paste custom CSS in the admin and it is injected after the module's own styles for easy overrides.

Built to Last

  • MEQP-style code with constructor dependency injection only.
  • Full Page Cache compatible - the attachments block is cache-aware.
  • Translation ready - every label goes through Magento's __() function.
  • Cron-based cleanup for download logs based on the configured retention days.

Compatibility

Requirement Versions Supported
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce Cloud 2.4.4 to 2.4.8
PHP 8.1.x, 8.2.x, 8.3.x, 8.4.x
Hyva Theme 1.3+ (native Alpine.js support)
Luma Theme Native support
Required Dependency mage2kishan/module-core (free)

Installation

Composer Installation (Recommended)

composer require mage2kishan/module-product-attachments
bin/magento module:enable Panth_Core Panth_ProductAttachments
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Manual Installation via ZIP

  1. Download the latest release from Packagist or from the product page.
  2. Extract it to app/code/Panth/ProductAttachments/ in your Magento install.
  3. Make sure Panth_Core is installed too (required dependency).
  4. Run the commands above starting from bin/magento module:enable.

Verify Installation

bin/magento module:status Panth_ProductAttachments
# Expected: Module is enabled

After install, open:

Admin → Panth Infotech → Product Attachments → Manage Attachments
Admin → Stores → Configuration → Panth Extensions → Product Attachments

Configuration

Go to Stores → Configuration → Panth Extensions → Product Attachments.

Setting Group Default Description
Enable Module General Settings Yes Master toggle. Disabling this hides all attachments on the frontend.
Show on Product Pages General Settings Yes Automatically display attachments on product detail pages.
Show on Category Pages General Settings Yes Automatically display attachments on category pages.
Show on CMS Pages General Settings Yes Automatically display attachments on CMS pages.
Show File Size Display Settings Yes Display file size next to each attachment in the frontend list.
Show Description Display Settings Yes Display the attachment description below the title.
Enable File Preview Display Settings Yes Show a preview button for PDF and image attachments.
Default View Mode Display Settings List Default display mode for the attachments block on the frontend.
Allow Guest Downloads Access Control Settings Yes Allow guests (not logged in) to download public attachments.
Enable Download Tracking Download Analytics Yes Log every download with IP, user agent, and customer details.
Log Retention Days Download Analytics 365 Days to keep download logs. Set 0 to keep forever. Cron cleans up old records.
Notify on Download Email Notifications No Send an email to a configured address when a file is downloaded.
Notification Email Email Notifications - Email address that receives download notifications (shown when Notify on Download is enabled).
Enable Custom CSS Custom CSS No Inject custom CSS after the module's default styles.
Custom CSS Code Custom CSS - CSS to inject. Prefix selectors with .panth-product-attachment-module to scope styles.

How It Works

  1. Go to Panth Infotech → Product Attachments → Manage Attachments and create an attachment. Upload one or more files (or add an external link) and fill in the title, description, type, access level, and customer group restriction.
  2. On the Products, Categories, or CMS Pages tab of the attachment edit form, assign it to the relevant entities.
  3. Customers see the attachments block on the product page, category page, or CMS page depending on which display toggles are enabled.
  4. When a customer clicks a file, the download goes through the Controller/Download/File.php controller. Access level and customer group checks are applied before the file is served. The download is logged.
  5. If email notifications are on, the configured address gets an email for each download.
  6. You can push a new version of any file through the attachment edit form. Old download history is preserved and linked to the specific version.
  7. Check Panth Infotech → Product Attachments → Download Analytics to review download activity.
  8. Panth Infotech → Product Attachments → Unused Files shows uploaded files not linked to any attachment, so you can remove them.

Widget Usage

  1. Go to Content → Elements → Widgets → Add Widget.
  2. Select Type: Product Attachments and your theme.
  3. Configure the widget options: source product or category, attachment types to show, and layout.
  4. Place the widget on any CMS page, block, or layout position.

Inline CMS usage:

{{widget type="Panth\ProductAttachments\Block\Widget\Attachments" product_id="123"}}

FAQ

Does product attachments work on Hyva themes?

Yes. Panth Product Attachments ships native Alpine.js templates for Hyva, with no jQuery, Knockout, or RequireJS. The module reads the active theme through Panth_Core and serves the correct template automatically.

Can I attach the same file to multiple products?

Yes. The file library is centralized. Upload once, then assign the same attachment to as many products, categories, or CMS pages as you need. No file duplication.

Can I restrict downloads to logged-in customers or a specific customer group?

Yes. Each attachment has an access level (public, logged-in only, or purchasers only) and a customer group IDs field. You can also turn off guest downloads globally in configuration.

Does it track who downloaded each file?

Yes. Every download logs the attachment, version, customer ID, customer email, IP address, user agent, and timestamp in the panth_product_attachment_download_log table. View the log in Panth Infotech → Product Attachments → Download Analytics.

What happens when I upload a new version of a file?

The new version becomes the current one. Old download history is preserved and linked to the specific version where the download happened. The previous file version stays in the version table.

Will it slow down product pages?

No. The attachments block uses a direct query against the relation tables. It is Full Page Cache compatible.

Does it work with external links (YouTube, Google Drive)?

Yes. Set is_link = 1 on an attachment and enter the URL. External link attachments are tracked and subject to the same access control as file attachments.

Can I use it on a multi-store setup?

Yes. Attachment visibility and configuration respect store-view scope. Attachment types can also be scoped per store view.

Does Panth Product Attachments need Panth Core?

Yes. mage2kishan/module-core is a free, required dependency that Composer installs for you automatically.


Support

Channel Contact
Product Page kishansavaliya.com/magento-2-product-attachments.html
Email kishansavaliyakb@gmail.com
Website kishansavaliya.com
WhatsApp +91 84012 70422
GitHub Issues github.com/mage2sk/module-product-attachments/issues
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech

Response time: 1-2 business days.

Need Custom Magento Development?

Looking for custom Magento module development, Hyva theme work, store migrations, or performance tuning? Get a free quote in 24 hours:


About Panth Infotech

Built and maintained by Kishan Savaliya (kishansavaliya.com), a Top Rated Plus Magento developer on Upwork with 10+ years of eCommerce experience.

Panth Infotech is a Magento 2 development agency that builds high quality, security focused extensions and themes for both Hyva and Luma storefronts. The extension suite covers SEO, performance, checkout, product presentation, customer engagement, and store management, with each module built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on our Magento extensions page or on Packagist.


Quick Links

Resource Link
Product Page magento-2-product-attachments.html
Packagist mage2kishan/module-product-attachments
GitHub mage2sk/module-product-attachments
Website kishansavaliya.com
Free Quote kishansavaliya.com/get-quote
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech
Email kishansavaliyakb@gmail.com
WhatsApp +91 84012 70422


SEO Keywords: magento 2 product attachments, magento 2 product attachments extension, magento 2 attach files to product, magento 2 downloadable files, magento 2 product downloads, magento 2 document attachments, magento 2 pdf attachments, magento 2 file manager extension, magento 2 attachment versioning, magento 2 download analytics, magento 2 download tracking, magento 2 customer group file access, magento 2 b2b downloads, magento 2 dealer portal downloads, magento 2 category attachments, magento 2 cms page attachments, magento 2 spec sheet download, magento 2 user manual download, magento 2 warranty document, magento 2 product brochure download, magento 2 safety data sheet, magento 2 attachment types, magento 2 attachment widget, magento 2 external link attachment, magento 2 hyva product attachments, hyva downloadable files, luma product attachments, magento 2.4.8 product attachments, php 8.4 magento attachments, panth product attachments, panth infotech, mage2kishan, kishan savaliya, top rated plus upwork magento, hire magento developer, custom magento development

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.