Linked Questions

12
votes
2answers
6k 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 ...
2
votes
4answers
4k 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) ->...
7
votes
3answers
2k 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 ...
2
votes
1answer
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 ...
2
votes
2answers
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 ...
1
vote
4answers
445 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 ...
1
vote
1answer
636 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()->...
0
votes
1answer
349 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") ->...
1
vote
2answers
301 views

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

custom filter of getLoadedProductCollection() function, getSize() method does not give correct value $this->getCollection()->getSize()
4
votes
0answers
74 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 ...
0
votes
3answers
26 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')->...