If someone else reading this, this is the answer from support:
I did check on your products and the reason you’re not seeing the option to edit all of the categories in bulk as shown in the Help Center is because not all products have suggestions set in it or is uncategorized. In this case, we’ll have to manually provide the categories for the products.
I know, this does not make sense at all. It would have bin a lot easier to just accept all that do have a suggestion.. If you want you can run this script in the browser inspect to accept the 50 that are shown, save and do this in a loop 10 iterations, after that it crashes. So this accepts 1000 products in a loop. Refresh and run again if you have more.
(async function processProducts() {
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // Helper to wait for a given time
let iterationCount = 0; // Initialize iteration counter
const maxIterations = 10; // Set the maximum number of iterations
while (iterationCount < maxIterations) {
console.log(Starting iteration ${iterationCount + 1});
// Step 1: Accept all category suggestions
document.querySelectorAll(‘button._ProductCategoryFieldButton_9anqn_62’).forEach(button => {
const icon = button.querySelector(‘shopify-internal-icon[type=“check-circle”]’);
if (icon) {
button.click(); // Click the “Accept” button
}
});
// Step 2: Click the “Save” button
const saveButton = document.querySelector(‘button.Polaris-Button–variantPrimary’);
if (saveButton && saveButton.textContent.includes(‘Save’)) {
saveButton.click();
console.log(‘Save button clicked.’);
}
// Step 3: Wait for the next set of products to load
// Adjust delay as needed to match loading time
await delay(3000); // Wait 3 seconds for the next batch to load
// Step 4: Increment the iteration counter
iterationCount++;
console.log(Iteration ${iterationCount} completed.);
// Step 5: Check if there are more products to process
const moreProducts = document.querySelector(‘button._ProductCategoryFieldButton_9anqn_62’);
if (!moreProducts) {
console.log(‘No more products to process.’);
break; // Exit the loop if no more products are found
}
}
console.log(‘Processing complete or maximum iterations reached.’);
})();