🔧 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>
63 lines
1.5 KiB
PHP
63 lines
1.5 KiB
PHP
<?php
|
|
|
|
|
|
class MiraviaLang
|
|
{
|
|
const ENGLISH = 'en';
|
|
const ARABIC = 'ar';
|
|
const GERMAN = 'de';
|
|
const SPANISH = 'es';
|
|
const FRENCH = 'fr';
|
|
const INDONESIAN = 'in';
|
|
const ITALIAN = 'it';
|
|
const HEBREW = 'iw';
|
|
const JAPANESE = 'ja';
|
|
const KOREAN = 'ko';
|
|
const DUTCH = 'nl';
|
|
const POLISH = 'pl';
|
|
const PORTUGUESE = 'pt';
|
|
const RUSSIAN = 'ru';
|
|
const THAI = 'th';
|
|
const TURKISH = 'tr';
|
|
const VIETNAMESE = 'vi';
|
|
|
|
public static $LanguagesISO = [
|
|
'ENGLISH' => 'en',
|
|
'ARABIC' => 'ar',
|
|
'GERMAN' => 'de',
|
|
'SPANISH' => 'es',
|
|
'FRENCH' => 'fr',
|
|
'INDONESIAN' => 'in',
|
|
'ITALIAN' => 'it',
|
|
'HEBREW' => 'iw',
|
|
'JAPANESE' => 'ja',
|
|
'KOREAN' => 'ko',
|
|
'DUTCH' => 'nl',
|
|
'POLISH' => 'pl',
|
|
'PORTUGUESE' => 'pt',
|
|
'RUSSIAN' => 'ru',
|
|
'THAI' => 'th',
|
|
'TURKISH' => 'tr',
|
|
'VIETNAMESE' => 'vi',
|
|
];
|
|
|
|
public static $Languages = [
|
|
'en' => 'en_US',
|
|
'ar' => 'ar_MA',
|
|
'de' => 'de_DE',
|
|
'es' => 'es_ES',
|
|
'fr' => 'fr_FR',
|
|
'in' => 'in_ID',
|
|
'it' => 'it_IT',
|
|
'iw' => 'iw_IL',
|
|
'ja' => 'ja_JP',
|
|
'ko' => 'ko_KR',
|
|
'nl' => 'nl_NL',
|
|
'pl' => 'pl_PL',
|
|
'pt' => 'pt_BR',
|
|
'ru' => 'ru_RU',
|
|
'th' => 'th_TH',
|
|
'tr' => 'tr_TR',
|
|
'vi' => 'vi_VN',
|
|
];
|
|
} |