Skip to content

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. It's also has support for API (SOAP)

deanpodgornik/magento2-productAttachment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 

Repository files navigation

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.

It also has API support (SOAP) for creating/updating and deleting attachments.

Installation Instruction

  • Copy the content of the repo to the app/code
  • Run command: php bin/magento setup:upgrade
  • Run command: php bin/magento setup:static-content:deploy
  • Now flush cache: php bin/magento cache:flush

How to Change Attachment Icons

Frontend Attachments Icons:

You can find all frontend attachment icons from here Prince\Productattach\view\frontend\web\images Just replace icon images with your icon image. Image file must be in png format.

Admin Attachments Icons:

You can find all admin attachment icons from here:Prince\Productattach\view\adminhtml\web\images Just replace icon images with your icon image. Image file must be in png format.

Run This Commands After changes icon images

php bin/magento setup:static-content:deploy

php bin/magento cache:flush

Screenshot

Product Page

Product Page

Attachment Admin Grid

Attachment Admin Grid

Add/Edit Attachment

Add-Edit Attachment

Select Products

Select Products On Add-Edit Attachment

Attachment Settings

Attachment Settings

API (SOAP) examples

Creating a new attachment record

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
   <soap:Header/>
   <soap:Body>
      <all:princeProductattachV1UpdateInsertAttachmentRequest>
         <productattachTable>
            <productAttachId>0</productAttachId>
            <name>testname</name>
            <description>test desc</description>
            <file>testfile.pdf</file>
            <url></url>
            <store>0,1</store>
            <customerGroup>0,1,2,3</customerGroup>
            <products>1</products>
            <active>1</active>
         </productattachTable>
         <filename>testfile.pdf</filename>
         <fileContent><![CDATA[JVBERi0xLjYNJeLjz9MN....CiUlRU9GDQo=]]></fileContent>
      </all:princeProductattachV1UpdateInsertAttachmentRequest>
   </soap:Body>
</soap:Envelope>

Updating an attachment record (same as the previous one, except for the given id in the productAttachId element)

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
   <soap:Header/>
   <soap:Body>
      <all:princeProductattachV1UpdateInsertAttachmentRequest>
         <productattachTable>
            <productAttachId>9</productAttachId>
            <name>testname</name>
            <description>test desc</description>
            <file>testfile.pdf</file>
            <url></url>
            <store>0,1</store>
            <customerGroup>0,1,2,3</customerGroup>
            <products>1</products>
            <active>1</active>
         </productattachTable>
         <filename>testfile.pdf</filename>
         <fileContent><![CDATA[JVBERi0xLjYNJeLjz9MN....CiUlRU9GDQo=]]></fileContent>
      </all:princeProductattachV1UpdateInsertAttachmentRequest>
   </soap:Body>
</soap:Envelope>

Deleting an attachment record

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:all="http://magetest:8000/index.php/soap/all?services=princeProductattachV1">
   <soap:Header/>
   <soap:Body>
      <all:princeProductattachV1DeleteAttachmentRequest>
         <int>9</int>
      </all:princeProductattachV1DeleteAttachmentRequest>
   </soap:Body>
</soap:Envelope>

About

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. It's also has support for API (SOAP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.2%
  • HTML 1.8%