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:
John Mizerek 2026-03-15 02:36:01 -07:00
parent 436f83d67e
commit add3842db3

View file

@ -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'] ?? [],
]); ]);
} }