🔧 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>
15 lines
570 B
PHP
15 lines
570 B
PHP
<?php
|
|
|
|
use Sweeper\PlatformMiddleware\Sdk\AeSdk\Iop\Constants;
|
|
use Sweeper\PlatformMiddleware\Sdk\AeSdk\Iop\IopClient;
|
|
use Sweeper\PlatformMiddleware\Sdk\AeSdk\Iop\IopRequest;
|
|
|
|
$c = new IopClient('api.taobao.tw/rest', '100240', 'hLeciS15d7UsmXKoND76sBVPpkzepxex');
|
|
$c->logLevel = Constants::$log_level_debug;
|
|
$request = new IopRequest('/product/item/get', 'GET');
|
|
$request->addApiParam('itemId', '157432005');
|
|
$request->addApiParam('authDO', '{"sellerId":2000000016002}');
|
|
|
|
var_dump($c->execute($request, null));
|
|
echo PHP_INT_MAX;
|
|
var_dump($c->msectime()); |