...
https://github.com/magesuite/file-attachments
The module was introduced in order to retrieve further information about the product, such as a user manual or photos. The additional files can be added to a product and are displayed on the PDP page, form where a user can download them.
Installation
Info |
---|
This module is optional. |
...
Backend
Note |
---|
In progress |
Frontend
If any attachment is added to a product attachments section is added to PDP page.
...
Attachments is a standard product details section that can be configured via XML:
Code Block |
---|
<block name="product.info.attachments" as="attachments" template="MageSuite_FileAttachments::product/view/attachments.phtml" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Attachments</argument>
<argument name="sort_order" xsi:type="string">20</argument>
<argument name="is_collapsible" xsi:type="boolean">true</argument>
<argument name="collapsible_widget_options" xsi:type="array">
<item name="mediaQueryScope" xsi:type="string">(max-width: 767px)</item>
</argument>
<argument name="view_model" xsi:type="object">MageSuite\FileAttachments\ViewModel\Product\Attachment</argument>
</arguments>
</block> |
The frontend component is called: cs-attachments
. As the component is optional styles must be imported in pdp.ts
entry:
Code Block |
---|
mport 'components/product-details/attachments'; |