WooCommerece REST API Api not showing all subcategories by parent

I’m requesting to the following endpoint


and getting a response for the first 2 children my problem those children has also children (deeply nested here of categories as showing on the image below ), I need to show all subcategories under a specific parent os how I can do this? enter image description here

Help with not displaying other subcategories

In the php web video script that I’m using, in the Upload Form, a User can choose which category to upload to. The Form also has a sub-category field to choose from. (Admin sets the subcategories, under a category).

Upon testing (after adding a subcategory called “trees” under Category A) on the Upload Form I see Category A and have two choices for subcategories “None” and “trees”.

But If I change my mind and decide, while the Upload Form is open, to upload to Category B, I still see the…

Help with not displaying other subcategories

ios Safari – Magento 2.2.2 Responsive Menu Subcategories not Expanding

ios Safari – Magento 2.2.3 Responsive Menu Subcategories not Expanding.


We’re finding an issue that occurs with iphone and tablets using Safari. It as a high occurrence rate:

Steps> 1. Visit webpage 2. Tap on Responsive Menu 3. Responsive Menu Opens 4. Tap on Category (expected result: subcategories expand beneath) 5. Sub categories do not expand

Getting Subcategories even if product count for each is 0

In my module, I am getting the current ID and then using the category repository and the “getChildren” method. This works great, except it doesn’t return child categories with product counts of 0.

How would I get around this?

“getAllChildren” seemed promising, but returned all descendants, whereas I’m just looking for the immediate children, regardless of product counts.

How to organize categories and subcategories of products in menus?

I have product content type that I want to display in a menu. Every product belongs to subcategory that belongs to main category, for example:

Computers:    PC:       - product 1       - product 2       - product 3    Laptop:       - product 1       - product 2       - product 3    Tablets:       - product 1       - product 2       - product 3  Phones:    Android:       - product 1       - product 2       - product 3    iOS:       - product 1       - product 2       - product 3 

When clicking on products item in main menu, I need to display a horizontal menu with main categories (Computers, Phones) and a vertical menu with subcategories (PC, Laptop, Tablets). Computers > PC should be the default selection. Whenever any category/subcategory is selected it should display a list of links to the product page.

What are the most common modules use to do something like this? Are there any tutorials or basic steps I can take to accomplish this goal?

Auto-expand subcategories in product form

I have a category with subcategories, and I want to have the subcategory visible from the beginning, when the user opens the category selector.

Currently, the user has to click the arrow next to the parent category to expand it and have access to the subcategory when choosing categories. This needs to be auto-expanded, as soon as the user opens the category selection when creating a new product.

enter image description here

How to get products of a category and all its subcategories by category id?

i am trying to get all products of specific category whether these products are directly listed in the category or in the subcategories under this specific category I really searched for this on google and Magento Stack Exchange and found nothing about Magento 2 , all i found are some topics on Magento 1,

Here is What i just reached ,

use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\Framework\Controller\Result\JsonFactory; use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;  class ChildProducts extends Action {     protected $  resultJsonFactory;     protected $  _categoryFactory;     protected $  productCollectionFactory;     public function __construct(Context $  context, JsonFactory $  jsonFactory ,\Magento\Catalog\Model\CategoryFactory $  categoryFactory ,     CollectionFactory $  productCollection)     {         $  this->_categoryFactory = $  categoryFactory;         $  this->resultJsonFactory = $  jsonFactory;         $  this->productCollectionFactory = $  productCollection;         parent::__construct($  context);     }      public function execute()     {         // get parent category         $  categoryId = $  this->getRequest()->getParam('category_id');           $  productCollection = $  this->productCollectionFactory->create();         $  productCollection->addAttributeToSelect('*');         $  productCollection->addCategoriesFilter(array('in' => $  categoryId));         return $  this->resultJsonFactory->create()->setData($  productCollection);     } 

How to organise routes for an app with subcategories in Node.js and make them modular

I have a basic grasp on Node.js and I’m playing with making my own app. While I understand how routes and controllers work, I only see tutorials where all the routes have similar structure which is very simplified and rigid.

I have three requirements for my app:

  1. To be able to display categories/subcategories without having to use IDs which are almost exclusively used in tutorials. The URL I would like is as follows:www.domain.com/women/dresses/silk/dress-item-1

  2. It has to be modular so that I can add new categories and not have to define routes for all categories. For example, if I added ‘shirts’, I would automatically have www.domain.com/women/shirts/... available. Or if I added ‘men’, I would have www.domain.com/men/... available.

  3. I would like to have the option of adding and stacking subcategories indefinitely in some way to get something like www.domain.com/women/dresses/silk/long/short/dress-item-1. I know I can use tags to define items, but I am wondering if this is possible instead.

What would be the best way to organize a form development tool that has questions that can optionally be grouped by categories and subcategories?

I am building a form design tool for some clients to use when filling out some surveys.

The form can be populated with questions which map to varying form elements (Text, Select, Checkboxes, etc) – and these can optionally be grouped by categories, and subcategories if necessary.

Consider this possibility:

|- Question 1 - Enter your name |- Question 2 - Enter your ID number |--- Category [Car] |---- Question 3 - What year is your car? |----- Category [INTERIOR] |------- Question 4 - What color is the interior |------- Question 5 - Do you have steering wheel controls |----- Category [EXTERIOR] |------- Question 6 - What color is the exterior paint |------- Question 7 - What size are the tires? 

So you can see, Questions 1 and 2 are outside of any categories. Question 3 is in Category CAR, and Question 4,5 and 6,7 are each in subcategories INTERIOR and EXTERIOR respectively.

I am currently using jQuery UI with the Draggable and Sortable interactions. So far it works reasonably well, until I got to the part where I have to be able to utilize categories for these things.

I have a side gutter menu which contains the available form elements, and the main panel has a blank area where the elements can be dropped. The items being pulled out of the gutter are cloned, so they can be reused.

My problem is that I cannot figure out a sane way to organize these questions in a logical manner that is not going to confuse the heck out of the admins that will be building these forms.

I did take the step of creating a draggable piece that is called Category which serves as a divider in the form, but it is still lacking a bit in the whole user centered design space. I also need to figure out the best way to add subcategories also, once a category has been added.

Any thoughts or comments are welcomed! I am truly stumped on this one. I am typically 70% developer, and 30% UI/UX. But this one is making me feel like I should run and hide.