Return priceMap from platform_images mode
order.online embeds displayPrice alongside images — now extracted and returned so items missing prices from image-based menus get filled in. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
436f83d67e
commit
add3842db3
1 changed files with 2 additions and 2 deletions
|
|
@ -195,14 +195,14 @@ JSEOF;
|
||||||
|
|
||||||
$result = json_decode(trim($output ?? ''), true);
|
$result = json_decode(trim($output ?? ''), true);
|
||||||
if (!is_array($result)) {
|
if (!is_array($result)) {
|
||||||
$result = ['imageMap' => [], 'totalFound' => 0];
|
$result = ['imageMap' => [], 'priceMap' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonResponse([
|
jsonResponse([
|
||||||
'OK' => true,
|
'OK' => true,
|
||||||
'mode' => 'platform_images',
|
'mode' => 'platform_images',
|
||||||
'imageMap' => $result['imageMap'] ?? [],
|
'imageMap' => $result['imageMap'] ?? [],
|
||||||
'totalFound' => $result['totalFound'] ?? 0,
|
'priceMap' => $result['priceMap'] ?? [],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue