Linked Questions

12
votes
2answers
8k 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
8k 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
3k 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 ...
6
votes
4answers
442 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 ...
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
777 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
780 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()->...
1
vote
2answers
762 views

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

custom filter of getLoadedProductCollection() function, getSize() method does not give correct value $this->getCollection()->getSize()
0
votes
1answer
552 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") ->...
0
votes
1answer
275 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 ...
4
votes
0answers
87 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 ...
-1
votes
2answers
108 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')->...
0
votes
2answers
32 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 \...