Jump to content

Toggle Categories When Editing Product


keweli

Recommended Posts

This is a quick, forceful, and untidy way to hide/show the whole category list when editing products for people who have an extremely long list like me.

edit file: admin/ajax_category_list.php

Edit lines 52 and 53 from:

'.$adminProducts->getL('Catalog:').'



to:

'.$adminProducts->getL('Catalog:').'

<input type="button" value="Show Categories" id="displayCategoriesButton"></td>




Add the following to the very end. There will be an error if you try putting it at the top:

   echo '[removed]
   function displayCategories()
   {
       var ele = document.getElementById ("displayCategoriesList");
       var btn = document.getElementById ("displayCategoriesButton");
       if (ele.style.display == "block") {
           ele.style.display = "none";
           ele.style.visibility = "hidden";
           btn.value = "Show Categories";
         }
       else {
           ele.style.display = "block";
           ele.style.visibility = "visible";
           btn.value = "Hide Categories";
       }
   }
   [removed]';



EDIT: replace [removed] with javascript embed tags. Forum doesn't allow me to show it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...