function replaceOnlyCategoriesSection() { console.log('Looking for product categories section to replace (v2 - precise targeting)...'); var $bulkEdit = $('#bulk-edit'); var $categorySection = null; // Method 1: Look for "Product Categories" text specifically $bulkEdit.find('label, legend, h4, .inline-edit-group label').each(function() { var $this = $(this); var text = $this.text().trim().toLowerCase(); if (text === 'product categories' || text === 'categories') { console.log('Found Product Categories label:', $this.text()); // Find the associated checkbox container var $container = $this.next('.categorychecklist, .cat-checklist'); if ($container.length === 0) { // Try finding siblings or parent containers $container = $this.siblings('.categorychecklist, .cat-checklist').first(); } if ($container.length === 0) { // Try finding in parent fieldset $container = $this.closest('fieldset').find('.categorychecklist, .cat-checklist').first(); } if ($container.length === 0) { // Look for any container with product_cat checkboxes after this label $container = $this.nextAll().find('input[name="tax_input[product_cat][]"]').closest('ul, div').first(); } if ($container.length > 0 && $container.find('input[name="tax_input[product_cat][]"]').length > 0) { console.log('Found matching category container after label'); $categorySection = $container; return false; // Break the loop } } }); // Method 2: If method 1 failed, look for containers with only product_cat inputs (not brands) if (!$categorySection) { console.log('Method 1 failed, trying method 2...'); $bulkEdit.find('.categorychecklist, .cat-checklist, ul, div').each(function() { var $this = $(this); var productCatInputs = $this.find('input[name="tax_input[product_cat][]"]').length; var otherInputs = $this.find('input[type="checkbox"]').not('input[name="tax_input[product_cat][]"]').length; // Only target containers that have ONLY product category inputs if (productCatInputs > 10 && otherInputs === 0) { console.log('Found container with only product categories:', productCatInputs, 'categories, no other inputs'); $categorySection = $this; return false; // Break the loop } }); } // Method 3: Fallback - find by examining the structure more carefully if (!$categorySection) { console.log('Method 2 failed, trying method 3...'); // Look for the specific WordPress taxonomy structure $bulkEdit.find('fieldset, .inline-edit-group').each(function() { var $fieldset = $(this); var $label = $fieldset.find('label, legend').filter(function() { return $(this).text().toLowerCase().includes('categor'); }); if ($label.length > 0) { var $categoryList = $fieldset.find('.categorychecklist, .cat-checklist').first(); if ($categoryList.length > 0 && $categoryList.find('input[name="tax_input[product_cat][]"]').length > 0) { console.log('Found category section via fieldset structure'); $categorySection = $categoryList; return false; } } }); } if ($categorySection && $categorySection.length > 0) { console.log('Replacing category section content...'); // Store the original parent for context var $originalParent = $categorySection.parent(); // Replace only the checkbox container content $categorySection.html( '
' + '
' + 'VegaVend Category Browser - Browse 0 categories efficiently!' + '
' + '' + '
' + '' + '' + '
' + '' + '' + '
' + '
' + 'Mode:
' + '' + '' + '
' + '
' ); console.log('Categories content replaced successfully. Parent context preserved.'); // Initialize VegaVend interface setTimeout(function() { if (window.VegaVendProductEditor) { window.VegaVendProductEditor.state = { currentPage: 1, currentParent: 0, isLoading: false, searchTimeout: null, selectedCategories: [] }; window.VegaVendProductEditor.bindEvents(); window.VegaVendProductEditor.loadSelectedCategories(); console.log('VegaVend interface initialized'); } }, 300); } else { console.log('Could not find Product Categories section. Debugging available sections:'); // Enhanced debugging $bulkEdit.find('fieldset, .inline-edit-group').each(function(i) { var $section = $(this); var $labels = $section.find('label, legend, h4'); var labelTexts = $labels.map(function() { return $(this).text().trim(); }).get(); var checkboxCount = $section.find('input[type="checkbox"]').length; var categoryCount = $section.find('input[name="tax_input[product_cat][]"]').length; var brandCount = $section.find('input[name*="brand"]').length; console.log('Section ' + i + ':', { labels: labelTexts, totalCheckboxes: checkboxCount, categoryCheckboxes: categoryCount, brandCheckboxes: brandCount, element: $section.get(0) }); }); // Try again after more time setTimeout(replaceOnlyCategoriesSection, 3000); } }Cloud Curtains - VegaVend Stage 1

Main Menu

Privacy Overview
Sell on Buy on VegaVend - A UK Marketplace

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful. More can be read in our full Privacy Policy

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

3rd Party Cookies

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

Additional Cookies

This website uses the following additional cookies:

Google Adds

ct.pinterest.com