diff --git a/portal/setup-wizard.html b/portal/setup-wizard.html
index d7560a1..1107622 100644
--- a/portal/setup-wizard.html
+++ b/portal/setup-wizard.html
@@ -1449,8 +1449,12 @@
// Remove loading message and start conversation flow
document.getElementById('conversation').innerHTML = '';
- // In add-menu mode, skip business info and header
- if (config.businessId && config.menuId) {
+ // Check if any items have imageUrl - if so, offer image upload matching
+ const itemsWithImages = (config.extractedData.items || []).filter(item => item.imageUrl).length;
+ if (itemsWithImages > 0) {
+ showImageMatchingStep();
+ } else if (config.businessId && config.menuId) {
+ // In add-menu mode, skip business info and header
showCategoriesStep();
} else {
showBusinessInfoStep();
@@ -1489,12 +1493,12 @@
// Show step to upload images from saved webpage subfolder and match to items
function showImageMatchingStep() {
const itemCount = config.extractedData.items ? config.extractedData.items.length : 0;
- const mappingCount = config.imageMappings.length;
+ const itemsWithImages = (config.extractedData.items || []).filter(item => item.imageUrl).length;
addMessage('ai', `
-
I found ${itemCount} menu items and detected ${mappingCount} image references in the HTML.
- To add images to your menu items, upload the images from the saved webpage folder (usually named something like pagename_files).
- I'll automatically match images to items based on filenames.
+ I found ${itemCount} menu items with ${itemsWithImages} image references.
+ Upload the images from your saved webpage folder to add them to menu items.
+ I'll match by Toast item ID in the filename.