- This topic is empty.
February 28, 2018 at 11:34 am #267577
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?February 28, 2018 at 11:54 am #267578BeverleyhParticipantMarch 1, 2018 at 11:38 am #267647
Dupe.March 1, 2018 at 11:53 am #267648BeverleyhParticipant
Please can this duplicate thread be deleted so as not to clutter up the forum?March 1, 2018 at 9:02 pm #267655
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.
- The forum ‘Back End’ is closed to new topics and replies.