Hello!
I have currently just one product in my store. The product is in one parrent and in on subcategory. So it should show number 1 in parrent and number 1 in subcategory. But its showing number 2 in parrent and number 1 in subcategory. I think this is not logical...
Please help!
I have currently just one product in my store. The product is in one parrent and in on subcategory. So it should show number 1 in parrent and number 1 in subcategory. But its showing number 2 in parrent and number 1 in subcategory. I think this is not logical...
Please help!
No one can help you with such little information.
It is accepted to always post your OC version as well as themes and extensions and a web address is useful on many occasions.
However, even if you post this I suspect the answer will be the same
Double check that you have not inadvertently added a product to a sub category.
Contact your theme developer or the developer of the extension.
I have not noticed or ever been advised by a client that this is happening.
That does not always mean that it is not Opencart related, but it would appear NOT to be Opencart related.
It is accepted to always post your OC version as well as themes and extensions and a web address is useful on many occasions.
However, even if you post this I suspect the answer will be the same
Double check that you have not inadvertently added a product to a sub category.
Contact your theme developer or the developer of the extension.
I have not noticed or ever been advised by a client that this is happening.
That does not always mean that it is not Opencart related, but it would appear NOT to be Opencart related.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
- products in category : 1
- products in sub-category : 1
-> total in category ( in category itself and in all sub-categories ) : 2
-> total in sub-category : 1
It's logical !
See code in module/category.php:
Code: Select all
$filter_data = array('filter_category_id' => $child['category_id'], 'filter_sub_category' => true);
$children_data[] = array(
'category_id' => $child['category_id'],
'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''),
@pprmkr you are quite right - I have never noticed in all these years ! Learn something new everyday. Thank you
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Follow the code in controller/module/category.php and loaded models ...
Explanation for used code on https://www.php.net/
Explanation for used code on https://www.php.net/
Who is online
Users browsing this forum: No registered users and 133 guests