Installation Guide
This guide will walk you through the complete installation process for the Order Item Image Module in your Magento 2 store.
๐ Prerequisitesโ
Before installing the module, ensure your system meets these requirements:
System Requirementsโ
- Magento 2.4.x (2.4.0 or higher)
- PHP 8.1+ (recommended) or PHP 7.4+
- Composer 2.x
- File system write permissions
- Memory limit: 2GB or higher
- Execution time: 300 seconds or higher
Pre-Installation Checklistโ
- Backup your Magento 2 installation
- Backup your database
- Ensure you have SSH access to your server
- Verify Composer is properly configured
- Check available disk space (at least 500MB free)
๐ง Installation Methodsโ
Method 1: Composer Installation (Recommended)โ
Step 1: Connect to Your Serverโ
ssh your-server-ip
cd /path/to/your/magento/installation
Step 2: Install via Composerโ
composer require jigar/module-orderitemimage
Step 3: Run Magento Setup Commandsโ
# Enable the module
php bin/magento module:enable Jigar_OrderItemImage
# Run database updates
php bin/magento setup:upgrade
# Compile dependency injection
php bin/magento setup:di:compile
# Deploy static content
php bin/magento setup:static-content:deploy -f
# Clear all caches
php bin/magento cache:flush
# Reindex all data
php bin/magento indexer:reindex
Step 4: Verify Installationโ
# Check if module is enabled
php bin/magento module:status Jigar_OrderItemImage
# List all enabled modules
php bin/magento module:status
Method 2: Manual Installationโ
Step 1: Download Module Filesโ
Download the module files from the repository or package.
Step 2: Upload Filesโ
Upload the module files to your Magento installation:
# Create module directory
mkdir -p app/code/Jigar/OrderItemImage
# Upload files to the directory
# (Use your preferred method: FTP, SCP, etc.)
Step 3: Run Setup Commandsโ
# Enable the module
php bin/magento module:enable Jigar_OrderItemImage
# Run database updates
php bin/magento setup:upgrade
# Compile dependency injection
php bin/magento setup:di:compile
# Deploy static content
php bin/magento setup:static-content:deploy -f
# Clear all caches
php bin/magento cache:flush
# Reindex all data
php bin/magento indexer:reindex
โ๏ธ Post-Installation Configurationโ
Step 1: Access Admin Panelโ
- Log in to your Magento 2 admin panel
- Navigate to Stores โ Configuration
Step 2: Configure Module Settingsโ
- Go to Jigar Extensions โ Order Item Image
- Configure the following settings:
- Enable Module: Yes/No
- Image Size: Small/Medium/Large
- Enable for Emails: Yes/No
- Enable for Invoices: Yes/No
- Enable for Packing Slips: Yes/No
Step 3: Save Configurationโ
- Click Save Config
- Clear cache if prompted
๐งช Testing the Installationโ
Test 1: Create a Test Orderโ
- Create a test customer account
- Add products to cart
- Complete checkout process
- Check order confirmation email for product images
Test 2: Generate Invoiceโ
- Go to Sales โ Orders
- Find your test order
- Create invoice
- Download PDF and verify product images
Test 3: Admin Order Viewโ
- Go to Sales โ Orders
- Open order details
- Verify product images are displayed
๐จ Troubleshootingโ
Common Issues and Solutionsโ
Issue 1: Module Not Foundโ
Error: Could not find a matching version of package jigar/module-orderitemimage
Solution:
# Clear Composer cache
composer clear-cache
# Update Composer repositories
composer update
# Try installation again
composer require jigar/module-orderitemimage
Issue 2: Permission Deniedโ
Error: Permission denied during installation
Solution:
# Set proper file permissions
chmod -R 755 app/code/Jigar/
chown -R www-data:www-data app/code/Jigar/
# Set proper directory permissions
find app/code/Jigar/ -type d -exec chmod 755 {} \;
find app/code/Jigar/ -type f -exec chmod 644 {} \;
Issue 3: Compilation Errorsโ
Error: Compilation failed during setup:di:compile
Solution:
# Remove generated files
rm -rf generated/*
rm -rf var/cache/*
rm -rf var/page_cache/*
# Recompile
php bin/magento setup:di:compile
php bin/magento cache:flush
Issue 4: Images Not Displayingโ
Error: Product images not showing in emails/documents
Solution:
- Check module configuration in admin
- Verify image paths are correct
- Clear all caches
- Check file permissions on media directory
Performance Optimizationโ
For High-Traffic Storesโ
# Enable production mode
php bin/magento deploy:mode:set production
# Optimize for production
php bin/magento setup:static-content:deploy -f
php bin/magento cache:enable
For Developmentโ
# Enable developer mode
php bin/magento deploy:mode:set developer
# Disable cache for development
php bin/magento cache:disable
๐ Getting Helpโ
If you encounter any issues during installation:
- Check the logs:
var/log/system.logandvar/log/exception.log - Verify requirements: Ensure all prerequisites are met
- Contact support: Reach out to our support team
- Community forum: Check for similar issues and solutions
โ Installation Checklistโ
- Module installed via Composer or manual method
- Database updated successfully
- Static content deployed
- Caches cleared
- Module enabled and configured
- Test order created and verified
- Invoice generated with images
- Admin interface working correctly
Next Steps: Configure the module or learn about advanced features.