Questions tagged [sorting]

Denotes questions related to sorting collections in Magento.

Filter by
Sorted by
Tagged with
1
vote
1answer
255 views

Where Can I Sort Date Attribute

One of the configurable attributes on the product details page is date. Currently these are displayed in the order which they are found in the database. I need for these to display on the product ...
1
vote
1answer
2k views

Admin Panel order grid: Multiple sort conditions?

I am wondering if it's possible to specify multiple sorting conditions for the order grid in the Admin Panel. Let's say for example I wanted to sort all orders first by their Bill to Name and then ...
0
votes
1answer
3k views

Sort by 2 attributes with different orders

I have to catalog sort by 2 attributes with different orders (asc, desc). I have change in function setCollection($collection). But here order is overwrite on another order. Here is my code, which I ...
1
vote
2answers
16k views

Product collection Sort by Custom attribute with yes/no Option

Hi I have created one attribute called archive whose type is Yes/No. So archive attribute for every product has either Yes/No. Now I want to sort product collection so that all products whose archive ...
2
votes
2answers
2k views

How do I sort product array on Checkout Page by the products mother-category IDs?

I´m currently working om some modifications on my client´s Magento "One Page Checkout" page. I have managed to get all the product items using this code: $session= Mage::getSingleton('checkout/...
0
votes
2answers
987 views

Sort Order of Products in Category Grid View by View Count

I've been trying to create a solution to this for some time now, and have been to the ends of the internet and back, maybe I missed something. What I am trying to do is sort the product collection in ...
2
votes
1answer
129 views

sort by new in magento 1.7.0.2 ce as default for category page

We can't manage to sort by new as default in the category product list. This does only work when we set the order option in the category back-end, but due to our large category three we can't do this ...
7
votes
1answer
45k views

Custom Sort Order For Collection

I need to sort a collection based on "sort_order" field instead of "id" as shown in the image. $collection=Mage::getResourceModel('banners/manage_collection'); $collection->getSelect()->order('...
2
votes
2answers
3k views

Is it possible to sort the product collection based on another array that contains skus

I have an array that contains some SKUs belonging to the current category. I want to reorder the collection based on that array so that the SKUs present in my order array will come first. For this i ...
2
votes
1answer
2k views

How to set (in admin) products of a certain category to default sort by date added

I am using Magento 1.7.0.2 I would like to have several the products for several of my categories to be automatically sorted by date added. Currently, in the 'Display Settings' tab for any one of my ...
18
votes
5answers
37k views

How to list products in descending order?

This seemed simple but is proving otherwise -- I just want to list all products in my store from high -> low To do so, I went to: Configuration -> Catalog -> Product Listing Sort by -> (I ...
2
votes
1answer
229 views

Problem with sort by category?

When I have products in categories ( I have sub-categories in this category) I don't have sort by category just sort by price. I want to add sort by category with sort by price. For example : if i ...
12
votes
1answer
19k views

How to specify custom sort order for product collection?

I am trying to create a product collection based on array of products ids, and also sort the collection based on the ids array. $productIds = array(318,310,311); $collection = Mage::getModel('catalog/...
5
votes
1answer
3k views

Sorting of Categories based on a attribute of product item

In my project, by default, I have some categories which are visible in frontend as shown below: category-1 sub-category-1 sub-category-2 category-2 sub-category-1 category-3 ...
-1
votes
3answers
4k views

Change default category sort order by "in stock" [duplicate]

I'm trying to change the way my default "Best Value" view works for a category (both list/grid views) so that items which are "in stock" appear first and then out of stock items last. I have ...

1
4 5 6 7
8