Letscms Product Attachment Module for Magento 2 Documentation

Introduction

  • The Product Attachment Module for Magento 2 The enables merchants to enhance their product detail pages with downloadable content. Whether you need to attach user manuals, datasheets, brochures, or templates, this module provides a streamlined and efficient way to do so. By integrating file attachments directly into the product page, merchants can improve customer satisfaction and product understanding.

Key Benefits

Core Features

  • Attach Files to Individual Products: Upload specific files for products that require additional documentation or guides.
  • Multiple File Format Support: Accepts popular file formats, such as PDFs, Word documents, Excel sheets, images (JPG, PNG), and more.
  • Admin-Friendly Interface::Offers a seamless and intuitive interface for file upload and management within the Magento admin panel.

Overview

  • The Product Attachment Module integrates seamlessly with Magento 2. It adds a new section to the product edit page in the admin panel, allowing administrators to upload and attach files to individual products. These files are then displayed as download links on the corresponding product detail pages on the frontend.

Installation

Preparation:

  • Before starting the installation, ensure that your Magento environment meets the following prerequisites:
System Requirements:
  • PHP Version: 7.4 or higher is recommended.
  • Composer: Must be installed for dependency management.
  • Database Backup: Backup your database and files to prevent data loss during installation..

Magento 2 module installation. Here's a detailed guide on how to proceed:

Magento 2 module Installation

Step 1:Extract the Zip File:
  • Extract the contents of the zip file to a temporary directory on your computer.
Step 2: Copy Files to Magento Root Directory:
  • Copy all files and folders from the extracted zip file.
  • Paste the copied files into the Upload the extracted files to the app/code/Letscms/ProductAttachment directory in your Magento root.
Step 3: Open Terminal or CMD:
  • Change your working directory to the Magento root directory using the following command:
  • you need to run the following commands to install and activate the module:

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:clean

Verify Installation:

  • php bin/magento module:status
  • Log into your Magento Admin Panel.
  • Navigate toStores > Configuration > Letscms Product Attachment > General
  • Confirm that the module is listed and enabled, ensuring that all settings are accessible.

Troubleshooting:

  • Permissions Issue: Ensure the app/code directory and its contents have the correct permissions set for your web server user.
  • Magento Cache: If you encounter issues, try clearing Magento caches and reindexing:

    php bin/magento indexer:reindex
    php bin/magento cache:clean

Configuration


General Settings

genralconfig Letscms ProductAttachment page
  • Go to Stores > Configuration > Letscms Product Attachment and update general settings for defaults.
  • Fill all given fields
  • Enable Enable Product Attachment Module: set "YES" to enable plan for website.
  • Enable the Module:
    1. Attachment Show on Product View Page:
    2. Attachment Show on Order View Page:
    3. Product Attachment Tab Name:
    4. Allow File Upload Extension:

  • Frontend Functionality

    Letscms product page
    Customers Interact with the Module:
    • Customers see a product Attachment Tab Files section, where each attached file is displayed .
    • Clicking a link downloads the file or opens it in a new tabClicking a link downloads the file or opens it in a new tab, based on the configuration.
    Benefits for Customers:
    • Access essential product-related information conveniently
    • Enhanced trust through transparency and additional resources
    • A richer and more informative shopping experience.

    Letscms product page

    Admin Functionality

    Uploading Attachments
    • Go to Catalog > Products in the Magento admin panel.
    • Select a product to edit.
    • Scroll to the Product Attachment tab.
    • Upload a file using the "Choose File" button..
    • Save the product to make the attachment live.
    Managing Files:
    • Edit AttachmentsReplace the existing file with a new one by re-uploading.
    • Delete Attachments;Remove the file by clearing the upload field and saving the product
    Letscms product page

    Troubleshooting and FAQs


    Common Issues

    Problem Solution
    Attachment section not visible Ensure the module is enabled and an attachment is uploaded for the product.
    File upload errors Check the allowed file formats and server file size limits in php.ini.
    Cache not updated Run the cache flush command: php bin/magento cache:flush.

    Uninstallation Guide


    To remove the module, run the following commands:

  • you need to run the following commands to install and activate the module:

    php bin/magento module:disable Letscms_BuyNowBtn
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush