# FINEART Plugin v3.2 - Installation & Testing Guide

## Installation Steps

1. **Backup Current Plugin**
   - Before installing, backup your current FINEART plugin
   - Export any critical data if needed

2. **Deactivate Current Plugin**
   - Go to WordPress Admin > Plugins
   - Deactivate the current FINEART plugin
   - Do NOT delete it yet (just in case)

3. **Upload New Version**
   - Upload `fineart-plugin-v3.2.zip` via WordPress Admin > Plugins > Add New > Upload
   - Or extract and upload via FTP to `/wp-content/plugins/`

4. **Activate Plugin**
   - Activate the FINEART plugin
   - WordPress will automatically use the new version

5. **Clear Caches**
   - Clear any WordPress caches
   - Clear browser cache
   - Clear any CDN/server caches

## Testing Checklist

### 1. Menu Structure Test
- [ ] Log in as an artist (validated vendor)
- [ ] Go to Dashboard
- [ ] Verify menu structure matches:
  - Your Account (with 5 submenus)
  - Your Gallery (with 2 submenus)
  - Your Artworks (with 3 submenus)
  - Orders
  - Send a suggestion
  - FINEART News
  - Log Out

### 2. Edit Gallery Page Test
- [ ] Click "Your Gallery" > "Edit your gallery"
- [ ] Verify all fields are present:
  - Gallery name (text input)
  - Short bio (textarea with word counter)
  - Artist image (with upload button)
  - Long bio (textarea with word counter)
  - Social links (4 URL fields)

### 3. Word Counter Test
- [ ] Type in Short Bio field
- [ ] Verify word counter updates in real-time
- [ ] Type more than 30 words
- [ ] Verify counter turns red
- [ ] Repeat for Long Bio (120 words max)

### 4. Image Upload & Cropping Test
- [ ] Click "Choose Image" button
- [ ] Select a non-square image
- [ ] Verify cropper modal opens
- [ ] Use cropper to adjust selection
- [ ] Click "Apply Crop"
- [ ] Verify preview updates with square image
- [ ] Try with JPG and PNG formats

### 5. Form Submission Test
- [ ] Fill in all fields with valid data
- [ ] Click "Save Changes"
- [ ] Verify success message appears
- [ ] Refresh page
- [ ] Verify all data persisted correctly

### 6. Validation Test
- [ ] Try to submit with 35 words in Short Bio
- [ ] Verify error message appears
- [ ] Try to submit with 125 words in Long Bio
- [ ] Verify error message appears
- [ ] Try to upload a GIF file
- [ ] Verify error message appears

### 7. Payment Links Test
- [ ] Go to "Your Account" > "Payment method"
- [ ] Verify redirects to `/dashboard/vendor-billing/`
- [ ] Go to "Your Account" > "Payment History"
- [ ] Verify redirects to `/dashboard/transaction-details/`

### 8. Share Gallery Test
- [ ] Go to "Your Gallery" > "Share your gallery"
- [ ] Verify redirects to `/dashboard/embed-gallery/`
- [ ] Verify embed gallery page works correctly

### 9. Mobile Responsive Test
- [ ] View dashboard on mobile device
- [ ] Verify menu collapses properly
- [ ] Test Edit Gallery page on mobile
- [ ] Verify cropper works on touch devices
- [ ] Check all form fields are accessible

### 10. Pending Artist Test
- [ ] Log in as pending artist
- [ ] Verify menu structure is appropriate
- [ ] Verify "Your Account" has only 3 items (no payments)
- [ ] Verify Edit Gallery page works for pending artists

## Troubleshooting

### Menu Not Updating
1. Clear WordPress cache
2. Clear browser cache
3. Log out and log back in
4. Check if MultivendorX is active and up to date

### Cropper Not Working
1. Check browser console for JavaScript errors
2. Verify Cropper.js CDN is accessible
3. Try different browser
4. Check if jQuery is loading correctly

### AJAX Errors
1. Check WordPress admin-ajax.php is accessible
2. Verify nonce is being generated correctly
3. Check PHP error logs
4. Verify user has correct role (dc_vendor or dc_pending_vendor)

### Image Upload Fails
1. Check WordPress upload directory permissions
2. Verify PHP file_uploads is enabled
3. Check upload_max_filesize in php.ini
4. Verify media_handle_sideload function exists

### Word Counter Not Working
1. Check JavaScript console for errors
2. Verify jQuery is loaded
3. Check if fineart-edit-gallery.js is enqueued
4. Verify fineart_edit_gallery_vars is localized

## Rollback Instructions

If you need to rollback to the previous version:

1. Deactivate v3.2
2. Delete fineart-plugin folder
3. Restore your backup
4. Reactivate the plugin

## Support

If you encounter issues:
1. Check the WordPress debug.log
2. Check browser console for JavaScript errors
3. Verify all files were uploaded correctly
4. Test with default WordPress theme
5. Disable other plugins to check for conflicts

## Notes

- This update does NOT modify the database structure
- All existing user meta is preserved
- Menu changes are immediate upon activation
- No data migration is required
- Compatible with existing MultivendorX setup
