Skip to content

Files

Latest commit

 

History

History
executable file
·
98 lines (75 loc) · 4 KB

README.md

File metadata and controls

executable file
·
98 lines (75 loc) · 4 KB

Download Latest Module with Magento 2.4.x support From Magento Marketplace

Magento2 Product Attachment

The Product Attachments extension for Magento 2 equips product pages with a special attachments block where you can upload numerous documents such as user guides, extra images, pdf, certificates, licenses and many others.

New Features

  • You can now manage attachments from the product edit page
  • Add multiple new attachments from the product edit page
  • Assign products to attachment by Product Grid, Product IDs, or by Product Skus
  • Implement widget to show specific attachments, all attachments or by current product
  • API support: Now you can manage attachments by APIs.
    • Create a new attachment
    • Update attachment
    • Get attachment
    • Delete attachment
    • Get attachments data by product id
  • Product API support: Now you can also manage attachments with product API
    • Assign/Remove attachments from the product
    • Get attachments

Check full description on Magento Marketplace

Demo

Frontend | Backend

Code to show attachments on CMS page or Static Block

1) To show 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}}

2) To show attachments of 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}}

3) To show attachments by file_type

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

4) To set number of attachments to show

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

5) To show attachment by attachment id(s)

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

Screenshot

Product Page - Table View

Product Page - List View

CMS Page

Product Edit Page

Add/Edit Attachment