Skip to content

Latest commit

 

History

History
executable file
·
80 lines (63 loc) · 4.81 KB

File metadata and controls

executable file
·
80 lines (63 loc) · 4.81 KB

Magento2 Product Attachment

The Product Attachments extension for Magento 2 adds a dedicated attachments section to your product pages, allowing you to upload a variety of files—user guides, additional images, PDFs, certificates, licenses, and more.

✨ Features

  • Manage and add multiple attachments directly from the product edit page
  • Import/export attachments for easy data handling
  • Assign attachments to products using product grid, IDs, or SKUs
  • Display attachments via widget: all, specific, or current product-based
  • Include attachments in new order confirmation emails and sitemaps
  • Full API support to create, update, retrieve, and delete attachments
  • Product API support to assign/remove attachments and fetch data
  • GraphQL support to fetch attachments by product ID and retrieve icons
  • Upload unlimited attachments with title, icon, and file size display
  • Download attachments from the grid or edit form
  • Simple attachment management with customer group & store view restrictions
  • Add attachments as downloadable links
  • Customize attachment labels and visibility of the Product Attachment tab
  • Show file size on the frontend
  • Choose between table view or list view for displaying attachments
  • Hyvä theme compatibility
  • Supports various file formats: jpg, jpeg, gif, png, pdf, csv, bmp, txt, doc, docx, xls, xlsx, rtf, ppt, pptx, zip and many more

Check full description on Magento Marketplace

📺 Demo

Frontend | Backend

Code to show attachments on CMS page or Static Block

Display all attachments:

{{block class="Mageprince\Productattach\Block\AllAttachment" template="Mageprince_Productattach::all-attachment.phtml" show_icon=1 show_label=1 show_description=0 show_filetype=0 show_size=1 show_download=1 apply_customer_filter=1 apply_store_filter=1}}

Display attachments for the current product:

{{block class="Mageprince\Productattach\Block\AllAttachment" template="Mageprince_Productattach::all-attachment.phtml" show_icon=1 show_label=1 show_description=0 show_filetype=0 show_size=1 show_download=1 apply_customer_filter=1 apply_store_filter=1 current_product=1}}

Display attachments by file type (e.g., PDF, DOC):

{{block class="Mageprince\Productattach\Block\AllAttachment" file_type="pdf,doc" template="Mageprince_Productattach::all-attachment.phtml"}}

Limit the number of attachments displayed:

{{block class="Mageprince\Productattach\Block\AllAttachment" count="10" template="Mageprince_Productattach::all-attachment.phtml"}}

Show specific attachments by ID:

{{block class="Mageprince\Productattach\Block\AllAttachment" attachment_id="5,6" template="Mageprince_Productattach::all-attachment.phtml"}}

📸 Screenshots

01_table_view_description 03_table_view_tab 02_list_view_description 04_list_view_tab 5_cms_page 6_admin_product_edit 6_admin_product_edit_1 7_admin_product_edit_2 9_admin_grid 10_admin_attachment_edit_1_updated 10_admin_attachment_edit_1 11_admin_attachment_edit_2 12_admin_attachment_edit_product 14_configuration_1 15_configuration_import_export 16_configuration_block