Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Woo Commerce AJAX Category meta box in Admin add/edit screen

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #267577
    alias3729
    Participant

    I’m helping build a WooCommerce site that sells engine repair products. The problem is, in the Admin, the add/edit product page takes a VERY long time to load because it’s trying to load all the product categories all at once, and there’s about 45,000 of them. That number is largely unavoidable, because there are 6 main-level categories (Automotive, Semis, Construction Equipment, Marine/Boats, Motorcycles, and Agricultural). For each type of equipment, they’re broken down into subcategories for Make, Model, and Year. In each main category, there can be many makes, then for each make, there can be many models, and for each model, there can be many years to choose from.

    To speed up the load time of the product add/edit page, I want to replace the default category selector meta box that appears on the right side of the page with an Ajax-loading category meta box. Instead of retrieving and listing ALL the categories all at once within a nested UL of check-boxes, I want the box to ONLY query for the top-level categories and list those. When a user checks that box (or clicks something to expand it), it should query and load via Ajax ONLY the categories that are a direct descendant of that checked category, etc. until it gets to the bottom level. When the user saves the product, it would then save the item in the checked categories.

    For the Edit piece, the desired effect would be to get the category hierarchy for the product being edited, then “check” the boxes using Ajax as well.

    Is there a way to do this? If so, what would be the best way to go?

    #267578
    Beverleyh
    Participant
    #267647
    alias3729
    Participant

    Dupe.

    #267648
    Beverleyh
    Participant

    @Paulie_D

    Please can this duplicate thread be deleted so as not to clutter up the forum?

    #267655
    alias3729
    Participant

    I don’t care about rules when the client mentions the word “refund.” But, that’s OK. Might as well delete both threads then, seeing as how the original didn’t get any replies anyway.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.