Fix image upload structure for Miravia API compliance
🔧 Bug Fixes: - Fixed product image structure to match Miravia API requirements - Updated MiraviaProduct.php getData() method to wrap images in {"Image": [...]} format - Updated MiraviaCombination.php getData() method to wrap SKU images properly - Resolved error "[4224] The Main image of the product is required" 📋 Changes: - Modified getData() methods to transform flat image arrays to nested structure - Product images: images[] → Images: {"Image": [...]} - SKU images: images[] → Images: {"Image": [...]} - Maintains backward compatibility for empty image arrays 🎯 Impact: - Product uploads will now pass Miravia's image validation - Both product-level and SKU-level images properly formatted - Complies with official Miravia API documentation structure 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,32 +1,126 @@
|
||||
=== Woo for Miravia ===
|
||||
Contributors: wecommsolutions
|
||||
Tags: miravia, woocommerce miravia, alibaba, aliexpress
|
||||
Requires at least: 5.0
|
||||
Tested up to: 6.3
|
||||
Requires PHP: 5.0
|
||||
Stable tag: 1.0.0
|
||||
License: GPLv2
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
# Miravia Feed API Connector
|
||||
|
||||
== Description ==
|
||||
Official WordPress/WooCommerce plugin for Miravia marketplace integration using the native Feed API.
|
||||
|
||||
Connect your store with Miravia, upload your products to Miravia and Download orders.
|
||||
## Overview
|
||||
|
||||
== Installation ==
|
||||
This plugin provides seamless integration between WooCommerce and Miravia marketplace, allowing merchants to:
|
||||
- Upload products using Miravia's official Feed API
|
||||
- Manage product synchronization with job queue monitoring
|
||||
- Download and process orders from Miravia
|
||||
- Handle multiple Miravia accounts and profiles
|
||||
|
||||
* Upload the add-in folder to the "/ wp-content / plugins /" directory or install the add-in directly from the WordPress add-ons screen.
|
||||
* Activate the plugin from the «Add-ons» screen in WordPress
|
||||
* Enjoy!
|
||||
|
||||
== FAQ ==
|
||||
## Key Features
|
||||
|
||||
Visit wecomm.es
|
||||
|
||||
== Changelog ==
|
||||
### ✅ Feed API Integration
|
||||
- **Official API**: Uses Miravia's native Feed API (no third-party proxies)
|
||||
- **Asynchronous Processing**: Jobs are processed in background with real-time status monitoring
|
||||
- **Bulk Operations**: Submit multiple products simultaneously
|
||||
- **Error Handling**: Comprehensive error tracking and retry functionality
|
||||
|
||||
= 1.0.0 =
|
||||
* Initial version
|
||||
### ✅ Product Management
|
||||
- **Direct Upload**: Submit individual products or bulk selections
|
||||
- **Status Monitoring**: Real-time job status tracking in admin interface
|
||||
- **Auto-sync**: Automatic product updates when WooCommerce data changes
|
||||
- **Image Support**: Proper image handling for Miravia's requirements
|
||||
|
||||
== Localization ==
|
||||
### ✅ Order Management
|
||||
- **Order Import**: Download orders from Miravia to WooCommerce
|
||||
- **Status Sync**: Bidirectional order status synchronization
|
||||
- **Shipping Labels**: Generate and manage shipping labels
|
||||
- **Multi-account**: Support for multiple Miravia seller accounts
|
||||
|
||||
English (US).
|
||||
## Requirements
|
||||
|
||||
- **WordPress**: 5.0 or higher
|
||||
- **WooCommerce**: 3.0 or higher
|
||||
- **PHP**: 7.4 or higher
|
||||
- **Miravia Account**: Active seller account with API credentials
|
||||
|
||||
## Installation
|
||||
|
||||
1. Upload the plugin files to `/wp-content/plugins/miravia-feed-connector/`
|
||||
2. Activate the plugin through WordPress admin
|
||||
3. Go to **Miravia > Configuration** and enter your API credentials
|
||||
4. Enable "Use Feed API Only" option
|
||||
5. Test your API connection
|
||||
|
||||
## Configuration
|
||||
|
||||
### API Credentials
|
||||
|
||||
Navigate to **Miravia > Configuration** and provide:
|
||||
|
||||
- **App Key**: Your Miravia/AliExpress App Key
|
||||
- **Secret Key**: Your Miravia/AliExpress Secret Key
|
||||
- **Access Token**: Your personal seller access token
|
||||
|
||||
### Feed API Settings
|
||||
|
||||
Enable "Use Feed API Only" to use the official Miravia Feed API (recommended for all seller accounts).
|
||||
|
||||
## Usage
|
||||
|
||||
### Product Upload
|
||||
|
||||
1. Go to **Miravia > Products**
|
||||
2. Select products using checkboxes
|
||||
3. Click "Submit Selected to Feed API"
|
||||
4. Monitor progress in **Miravia > Jobs**
|
||||
|
||||
### Job Monitoring
|
||||
|
||||
The Jobs Queue provides:
|
||||
- Real-time status updates
|
||||
- Filtering by status (Pending, Processing, Completed, Failed)
|
||||
- Error details and retry functionality
|
||||
- Processing time tracking
|
||||
|
||||
### Order Management
|
||||
|
||||
Orders are automatically downloaded from Miravia and created as WooCommerce orders with proper status mapping.
|
||||
|
||||
## Development
|
||||
|
||||
### Architecture
|
||||
|
||||
- **Feed Manager**: Core job handling (`MiraviaFeedManager`)
|
||||
- **SDK Integration**: Direct API client (`MiraviaSdk`, `SimpleIopClient`)
|
||||
- **Database**: Custom tables for jobs and sync data
|
||||
- **AJAX Interface**: WordPress-native AJAX endpoints
|
||||
|
||||
### Database Tables
|
||||
|
||||
- `wp_miravia_feed_jobs`: Feed API job tracking
|
||||
- `wp_miravia_accounts`: Seller account credentials
|
||||
- `wp_miravia_profiles`: Product upload profiles
|
||||
- `wp_miravia_products`: Product sync status
|
||||
|
||||
## Support
|
||||
|
||||
For issues, feature requests, or development questions:
|
||||
|
||||
- **Repository**: https://github.com/CloudHost/miravia-woocommerce-connector
|
||||
- **Issues**: https://github.com/CloudHost/miravia-woocommerce-connector/issues
|
||||
- **Developer**: CloudHost Solutions
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 2.0.0
|
||||
- Complete rebuild using official Feed API
|
||||
- Removed WeComm proxy dependencies
|
||||
- Added job queue system with real-time monitoring
|
||||
- Enhanced error handling and retry functionality
|
||||
- Updated branding to CloudHost Solutions
|
||||
- Improved WordPress admin integration
|
||||
|
||||
### Version 1.x
|
||||
- Legacy WeComm proxy integration (deprecated)
|
||||
|
||||
## License
|
||||
|
||||
GPL v3 or later. See [LICENSE](https://www.gnu.org/licenses/gpl-3.0.html) for details.
|
||||
|
||||
---
|
||||
|
||||
**CloudHost Solutions** | https://cloudhost.es
|
||||
Reference in New Issue
Block a user