Linked Questions

0 votes
0 answers
39 views

Collection getSize() returns weird data [duplicate]

Well, here is getSize() definition inside AbstractDb class public function getSize() { if ($this->_totalRecords === null) { $sql = $this->getSelectCountSql(); ...
Ahmed Atef's user avatar
12 votes
2 answers
9k views

How to clone the collection in Magento?

I have one collection in a method where I want to perform two different operations on this collection. So, I want two separate copies of same collection, and then assign one of the two collections to ...
MagExt's user avatar
  • 1,833
2 votes
4 answers
9k views

How to check if a collection has items?

What does a product that is not found return in terms of Object? I'm loading a product like the following: $man_collection = Mage::getModel('catalog/category') ->load($mProduct) ->...
Stefanos's user avatar
  • 231
6 votes
4 answers
1k views

Sort by Best Seller on Category Page occur issue on Paging(Shows 1 item)

I have an issue from last three days.I make a sorting option by Best Seller on Category listing Page. Here You See three Products but item shows 1 which occurs issue on paging. I used ...
Muhammad Ahmed's user avatar
7 votes
3 answers
4k views

Fastest way to check if products exist

I have an external file containing product details, I'm looping through this file and for each product in said file I have to check if the product already exists in magento. The value to evaluate if ...
Tropus's user avatar
  • 73
2 votes
1 answer
4k views

Why getSize() function is not working when apply filter

I want to get count after the collection filter by attributes.Actually i want filter order collections by non canceled ,non fraud' and use getSize() function to get count but it is given count result ...
Amit Bera's user avatar
  • 77.2k
1 vote
4 answers
1k views

Why does getSize() does not match cart collection size?

Question popped up here: Filter collection on checkout/cart Why does a filtered $collection->getSize() returns correct value, but iterating over collection has more items? three items are in cart ...
sv3n's user avatar
  • 11.6k
2 votes
2 answers
2k views

Toolbar not displaying with overridden Mage_Catalog_Block_Product_List

I am banging my head against the wall on the following problem: To get a product list that is sorted by the subcategory string, an product attribute and finally by the product name I have overridden ...
Andreas W. Wylach's user avatar
1 vote
1 answer
890 views

Customer join query result getSize() issue

join query with customer table getSize() count mismatch with the mysql db result. Query ----- $collection = Mage::getModel('customer/customer')->getCollection(); $collection->getSelect()->...
senthil's user avatar
  • 1,707
1 vote
2 answers
1k views

Magento 2 - Collection getSize() returns zero

I have read about the difference between collection count() and collection getSize(), but I don't understand what's the reason that gives different numbers in each method. In a custom collection I ...
zekia's user avatar
  • 620
0 votes
1 answer
648 views

how to write collection query in magento 1.9

i have this custom collection which is taking much time to load, so want to change into sql query how can I achieve it? $delayedcollectioncount = Mage::getModel("customer/customer") ->...
supriya mishra's user avatar
1 vote
2 answers
1k views

Magento getCollection()->getSize() giving wrong value

custom filter of getLoadedProductCollection() function, getSize() method does not give correct value $this->getCollection()->getSize()
Alam Zaib's user avatar
  • 189
-1 votes
2 answers
170 views

Count of Customers with 0 Order magento 1.9

I want customers having 0 orders and there count I have done for order count of each customer but I want count of customer having 0 orders $CustomersCollection = Mage::getModel('customer/customer')->...
Inzamam Waikar's user avatar
4 votes
0 answers
90 views

Efficient way to access current result count in left block

Tried a few different approaches to this but still not sure of the best option for something which should be relatively simple. I want to output the current product result count, instead of within the ...
Tom Russell's user avatar
0 votes
2 answers
65 views

output information from the database magento 2

/Block/Reviews.php <?php namespace Training\Reviews\Block; use Training\Reviews\Model\ResourceModel\Reviews\Collection; use Magento\Framework\View\Element\Template; class Reviews extends \...
pixartN's user avatar
  • 29