How to get all products in a parent category (first level) in opencart? -


how products in parent category (first level) in opencart?

including subcategories , products

all products under menu(category) including subcategory products(children)

considering have id of current category stored in $category_id, try:

$data = array(     'filter_category_id'  => $category_id,     'filter_sub_category' => true );  $products = $this->model_catalog_product->getproducts($data); 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -