2022 Developer Survey is open! Take survey.

Questions tagged [count]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

How to get ordered product count in magento 2.4

How to get ordered product count of product. I want to how many product is there in that order?
user avatar
1 vote
1 answer
61 views

Multiple sorting, get first count of sorting

I want to know the count of the first sort of listing product in categories. I override /vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php to /app/code/Vendor/Module/Rewrite/...
user avatar
0 votes
1 answer
61 views

How to get the size of a collection without loading the full collection in Magento 2

I need to check the number of items in a collection without loading the full collection (as it has over 1.5 million items and causes memory issues). Is there an efficient way to go about this?
user avatar
0 votes
1 answer
104 views

Get order product item count in order success page - Magento 2

I want get number of product order in order success page. This found solution magento 1.9 visit Get ordered product count in magento <?php $_order = $this->getOrder() ?> <?php echo $_order-...
user avatar
0 votes
1 answer
65 views

Change qty input to the counter of the number of products on mini-cart

How to change qty input to the counter of the number of products. Expected Result:
user avatar
0 votes
2 answers
63 views

Warning Count Magento 2.2 & PHP 7.2

I receive the warning after upgrading to PHP 7.2 while running magento still in 2.2. Warning: count(): Parameter must be an array or an object that implements Countable in /vendor/magento/module-...
user avatar
0 votes
2 answers
405 views

product view count table in database magento 2?

I have to write code for getting product count.it is working fine but i want to know where the count record comes? public function getProductCount($id) { $prodData = $this->_prodCollection-&...
user avatar
  • 422
0 votes
0 answers
80 views

Count order with certain product

I need count the orders of a given customer only if the order contains a specific category, how to modify this to get what I want ? ex : if the order has a product from the category "watches", I want ...
user avatar
0 votes
1 answer
36 views

Magento site loading stage cart item count shows '0' at few seconds

In my cart having 5 products / item , but when i'm loading/refresh my project again cart item count shows '0' at few seconds after show only the exact count. how to solve this issue!
user avatar
  • 1,372
0 votes
1 answer
3k views

Magento 2 - how to use count and group by clause in collection

i have order collection and want to this query result like `SELECT `created_at`,COUNT(`entity_id`) FROM `sales_order_item` GROUP BY `created_at`; i use this query `$selectCollection=$this->...
user avatar
  • 1,516