From 91c34d120fb26debd9aafdfee282c0245cf2d6e3 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Fri, 13 Feb 2026 09:01:32 -0800 Subject: [PATCH] Skip image upload step when items have remote image URLs Items from Toast menus have CDN URLs (https://img.cdn4dd.com/...) which saveWizard.cfm will download automatically. No need to prompt user to upload images when remote URLs are already present. Co-Authored-By: Claude Opus 4.5 --- portal/setup-wizard.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/portal/setup-wizard.html b/portal/setup-wizard.html index 4592f07..4b45044 100644 --- a/portal/setup-wizard.html +++ b/portal/setup-wizard.html @@ -1508,9 +1508,22 @@ // Remove loading message and start conversation flow document.getElementById('conversation').innerHTML = ''; - // Check if any items have imageUrl - if so, offer image upload matching + // Check if items have imageUrl - skip upload step if they're remote URLs (will be downloaded by saveWizard) const itemsWithImages = (config.extractedData.items || []).filter(item => item.imageUrl).length; - if (itemsWithImages > 0) { + const itemsWithRemoteImages = (config.extractedData.items || []).filter(item => + item.imageUrl && (item.imageUrl.startsWith('http://') || item.imageUrl.startsWith('https://')) + ).length; + + if (itemsWithRemoteImages > 0) { + // Items have remote image URLs - saveWizard will download them, skip upload step + console.log(`${itemsWithRemoteImages} items have remote image URLs - skipping upload step`); + if (config.businessId && config.menuId) { + showCategoriesStep(); + } else { + showBusinessInfoStep(); + } + } else if (itemsWithImages > 0) { + // Items have local image refs (Menu_files/) - show upload step showImageMatchingStep(); } else if (config.businessId && config.menuId) { // In add-menu mode, skip business info and header