mage2kishan/module-product-attachments

Product Attachments module for Magento 2 - attach files, links, and documents to products, categories, and CMS pages with Luma and Hyva theme support.

Maintainers

Package info

github.com/mage2sk/module-product-attachments

Type:magento2-module

pkg:composer/mage2kishan/module-product-attachments

Statistics

Installs: 8

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-04-17 15:00 UTC

This package is auto-updated.

Last update: 2026-04-17 15:02:42 UTC


README

Panth Product Attachments for Magento 2 — Downloadable Files, Documents & Links | Panth Infotech

Magento 2.4.4 - 2.4.8 PHP 8.1 - 8.4 Hyva Compatible Luma Compatible Packagist Upwork Top Rated Plus Panth Infotech Agency Get a Quote

Attach files, links, and documents to products, categories, and CMS pages in Magento 2 with a full-featured file manager, versioning, download analytics, attachment types, customer group access control, and a reusable widget. Works natively on both Hyva and Luma storefronts.

Panth Product Attachments lets merchants add unlimited downloadable files (PDFs, spec sheets, manuals, datasheets, videos, images, ZIPs, and more) or external links to any product, category, or CMS page. A centralized file manager with version control, attachment types, per-customer-group visibility, download tracking, and an embeddable widget makes it ideal for electronics catalogs, fashion size guides, B2B spec sheets, warranty documents, compliance files, and knowledge bases. The extension ships with ready-to-use templates for both Hyva (Alpine.js + Tailwind) and Luma, a powerful admin UI grid, and full MEQP-compliant code quality.

🚀 Need Custom Magento 2 Development?

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

Get a Free Quote

🏆 Kishan Savaliya

Top Rated Plus on Upwork

Hire on Upwork

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

🏢 Panth Infotech Agency

Magento Development Team

Visit Agency

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

Key Features

Attach Anywhere

  • Products — attach unlimited files or links to any simple, configurable, bundle, grouped, virtual, or downloadable product
  • Categories — add category-level attachments (brochures, lookbooks, size charts) inherited by child products optionally
  • CMS Pages — enrich About, FAQ, Policy, or Landing pages with downloadable resources
  • Multi-entity — one attachment can be linked to many products/categories/pages at once (no duplication)

Centralized File Manager

  • Upload once, reuse everywhere — single-source file library for all attachments
  • Versioning — upload a new version while preserving old download URLs and history
  • File replacement — swap a file in place without editing every product
  • Bulk assign/unassign — mass-attach files to multiple products from the grid
  • Drag-and-drop uploads — modern admin UI with progress bars

Download Analytics

  • Per-file download counter — see exactly how many times each file has been downloaded
  • Per-customer log — track which customer/guest downloaded what, when, and from which product
  • Date-range reports — filter downloads by day, week, month, or custom range
  • Top-downloaded grid — identify the most popular assets at a glance
  • CSV export — export download logs for BI or compliance

Attachment Types

  • Built-in types — PDF, DOC, XLS, PPT, ZIP, Image, Video, Audio, External Link
  • Custom types — define your own (e.g., "Spec Sheet", "Warranty", "User Manual", "Safety Data Sheet")
  • Type-specific icons — auto-detected file-type icons with customization
  • Filter frontend listing by type — customers can toggle "Manuals", "Videos", "Specs" etc.

Customer Group Access Control

  • Per-attachment visibility — restrict files to Retail, Wholesale, VIP, or custom customer groups
  • Guest vs logged-in — require login to download sensitive documents
  • Login-gated downloads — optional prompt before download triggers
  • B2B-ready — ideal for dealer portals, price lists, contracts

Frontend Display

  • Dedicated product tab — files list rendered in a native Magento product tab
  • Inline block — or display below short description / above add-to-cart
  • Icon + title + size + type — professional table layout with sort & filter
  • Responsive — mobile-first layout, tested on all breakpoints
  • Download counter display — optional "Downloaded X times" badge for social proof

Widget

  • Drag-and-drop widget — place an attachments block on any CMS page, block, or layout position
  • Configurable source — specific product, category, or file IDs
  • Filter by type — show only PDFs, only videos, etc.
  • Layout options — grid, list, or compact views

Hyva & Luma Storefront

  • Hyva-native templates — Alpine.js + Tailwind CSS, no jQuery/KnockoutJS, lightning-fast
  • Luma compatibility — native Magento Luma theme templates, fully responsive
  • Auto theme detection — via Panth_Core helper, no manual config needed
  • No layout conflicts — isolated CSS class prefixes

Security & Quality

  • Secure file delivery — files served through signed controller, direct filesystem paths hidden
  • File type whitelist — admin-configurable allowed extensions, MIME validation
  • Max file size enforcement — server-side check
  • Rate limiting — optional per-IP download throttling
  • MEQP compliant — passes Adobe's Magento Extension Quality Program
  • Zero third-party JS libs — vanilla JS + Alpine on Hyva, jQuery on Luma

Use Cases

  • Electronics & Appliances — user manuals, spec sheets, firmware, warranty PDFs, CAD files
  • Fashion & Apparel — size guides, care instructions, sustainability reports, lookbooks
  • Food & Beverage — nutrition sheets, allergen info, recipe cards, certificates
  • Health & Beauty — ingredient lists, safety data sheets (SDS), clinical studies
  • B2B / Wholesale — price lists, contracts, NDAs, catalog PDFs, dealer-only docs
  • Home & Garden — assembly guides, care manuals, dimension drawings
  • Software / Digital — license agreements, release notes, installer downloads
  • Automotive — compatibility charts, installation videos, parts diagrams

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 — 2.4.8
PHP 8.1.x, 8.2.x, 8.3.x, 8.4.x
MySQL 8.0+
MariaDB 10.4+
Hyva Theme 1.3+ (native templates)
Luma Theme Native support
Required mage2kishan/module-core (free)

Tested on:

  • Magento 2.4.8-p4 with PHP 8.4 (Hyva 1.3 + Luma)
  • Magento 2.4.7 with PHP 8.3
  • Magento 2.4.6 with PHP 8.2

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 ZIP from Packagist or the Adobe Commerce Marketplace
  2. Extract the contents to app/code/Panth/ProductAttachments/ in your Magento installation
  3. Also install Panth_Core (free dependency) from github.com/mage2sk/module-core
  4. Run the same commands as above starting from bin/magento module:enable

Verify Installation

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

After installation, navigate to:

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

Configuration

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

Setting Default Description
Enable Module Yes Master toggle for all Product Attachments functionality
Display Position Product Tab Where to render attachments: Tab, Below Description, Above Add-to-Cart, Custom Block
Tab Title Attachments Frontend tab label, translatable
Show File Size Yes Display file size next to each attachment
Show Download Count Yes Display "Downloaded X times" badge
Require Login No Force customer login before download
Allowed File Extensions pdf,doc,docx,xls,xlsx,ppt,pptx,zip,jpg,png,mp4 Comma-separated whitelist
Max File Size (MB) 50 Per-file upload limit
Enable Download Log Yes Track all downloads in the database
Log Retention (days) 365 Automatic cleanup of old logs
Default Customer Groups NOT LOGGED IN, General Groups allowed to download by default

How It Works

  1. Upload files via Panth Infotech → Product Attachments → Manage Files
  2. Assign files to one or more products, categories, or CMS pages via the attachments grid
  3. Configure per-attachment visibility, customer group restrictions, and type
  4. Customers see attachments in the product page tab, category page, or CMS page
  5. Downloads are tracked in real time; view analytics in Panth Infotech → Product Attachments → Download Log
  6. Upload new versions any time without breaking existing URLs

Widget Usage

  1. Go to Content → Elements → Widgets → Add Widget
  2. Select Type: Product Attachments and your theme
  3. Configure the storefront properties and widget options:
    • Source: specific product IDs, category IDs, or all
    • Filter by attachment type
    • Layout: grid, list, or compact
    • Items per row / limit
  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" layout="grid"}}

Hyva & Luma Support

This module ships with two parallel template sets:

  • Hyvaview/frontend/templates/hyva/ using Alpine.js + Tailwind CSS utility classes. No jQuery, no KnockoutJS, no RequireJS on the frontend.
  • Lumaview/frontend/templates/ using standard Magento KnockoutJS + jQuery widgets.

Theme detection is fully automatic via Panth\Core\Helper\Theme::isHyva(). No manual configuration is required. You can install this module on a mixed Hyva + Luma multi-store setup and each storefront will render the correct template.

FAQ

Can I attach the same file to multiple products?

Yes. The file library is centralized — upload once, assign to as many products, categories, or CMS pages as you want.

Can I restrict downloads to logged-in customers or B2B dealers only?

Yes. Each attachment supports per-customer-group access control. You can also force login globally via configuration.

Does the download counter work for guests?

Yes. Downloads are tracked for both guests and logged-in customers. Guest logs record IP and user-agent; customer logs record the customer ID.

What file types are supported?

Any file type can be uploaded. By default the whitelist covers PDF, Office documents, ZIP, images, and MP4 video. Admins can extend the whitelist.

Is there a max file size limit?

Configurable in admin (default 50 MB). Server-side upload_max_filesize and post_max_size PHP limits also apply.

Does it work on Hyva themes?

Yes. Native Hyva templates using Alpine.js + Tailwind ship out of the box. No bridge or compat module required.

Does it slow down product pages?

No. Attachments are loaded via a lightweight block with minimal SQL (one JOIN query per page). Full-page cache compatible.

Can I import attachments in bulk?

Yes. CSV import is supported via the file manager grid for mass assignment.

Does it support external links?

Yes. You can create "link" type attachments that redirect to external URLs (YouTube videos, Google Drive, external PDFs, etc.) while still being tracked.

Is the source code available?

Yes. Full source on GitHub at github.com/mage2sk/module-product-attachments.

Does it work with multi-store / multi-language?

Yes. All labels, titles, and descriptions are store-view scoped and translatable.

Support

Channel Contact
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 customization, store migrations, or performance optimization? Get a free quote in 24 hours:

Get a Free Quote

Hire on Upwork    Visit Agency    Visit Website

About Panth Infotech

Built and maintained by Kishan Savaliyakishansavaliya.com — a Top Rated Plus Magento developer on Upwork with 10+ years of eCommerce experience.

Panth Infotech is a Magento 2 development agency specializing in high-quality, security-focused extensions and themes for both Hyva and Luma storefronts. Our extension suite covers SEO, performance, checkout, product presentation, customer engagement, and store management — over 34 modules built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on the Adobe Commerce Marketplace or Packagist.

Quick Links

Ready to upgrade your Magento 2 store?
Get Started

SEO Keywords: magento 2 product attachments, magento 2 downloadable files, magento 2 product downloads, magento 2 document attachments, magento 2 file manager, magento 2 pdf attachments, magento 2 attach files to product, magento 2 category attachments, magento 2 cms page attachments, magento 2 product user manual, magento 2 spec sheet extension, magento 2 warranty document download, 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 safety data sheet, magento 2 product brochure download, magento 2 hyva product attachments, hyva downloadable files, luma product attachments, magento 2 attachment widget, magento 2 file manager extension, magento 2 external link attachment, magento 2 video attachment, magento 2.4.8 attachments, php 8.4 magento module, panth product attachments, panth infotech, mage2kishan, mage2sk, kishan savaliya, top rated plus upwork magento, hire magento developer, custom magento development, magento 2 hyva development, magento 2 performance optimization