Files
module-vendor-sales-report/INSTALL.md

98 lines
2.2 KiB
Markdown
Raw Normal View History

# Quick Installation Guide
## Step 1: Upload Module Files
From your Magento root directory:
```bash
# Create directory structure
mkdir -p app/code/Shopkeeper/VendorSalesReport
# Upload all module files to this directory
# (You can use FTP, SCP, or extract from ZIP)
```
## Step 2: Enable Module
```bash
php bin/magento module:enable Shopkeeper_VendorSalesReport
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
```
## Step 3: Configure Module
1. Log into Magento Admin
2. Go to **Stores > Configuration > Shopkeeper > Vendor Sales Report**
3. Configure settings:
### Required Settings:
- **Enable Automated Monthly Report**: Yes
- **Order Status Filter**: complete (or your preferred status)
- **Enable Email**: Yes
- **Email Recipients**: `vendor@example.com` (replace with actual email)
- **Email Subject**: `Monthly Thermo Report - {{month}} {{year}}`
- **Email Sender**: General Contact
4. Click **Save Config**
5. Run `php bin/magento cache:flush`
## Step 4: Test Manual Report
1. Go to **Reports > Sales > Vendor Sales Report**
2. Select a date range (defaults to last month)
3. Click **Preview Report** to see data
4. Click **Export CSV** to download
## Step 5: Verify Cron Setup
Test the automated report:
```bash
php bin/magento cron:run --group default
```
Check logs:
```bash
tail -f var/log/system.log | grep "Vendor Sales Report"
```
## Common Issues
### Module not appearing in admin menu
```bash
php bin/magento cache:flush
# Log out and log back into admin
```
### CSV downloads as blank
- Check that orders exist with the configured status in the date range
- Verify order status configuration
### Emails not sending
- Test Magento email with: System > Tools > Email Templates
- Check SMTP settings
- Verify email recipients are configured
## File Permissions (if needed)
```bash
chmod -R 755 app/code/Shopkeeper/
chown -R www-data:www-data app/code/Shopkeeper/ # adjust user as needed
```
## Uninstallation (if needed)
```bash
php bin/magento module:disable Shopkeeper_VendorSalesReport
php bin/magento setup:upgrade
rm -rf app/code/Shopkeeper/VendorSalesReport
php bin/magento cache:flush
```
## Support
Check README.md for detailed documentation and troubleshooting.