Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

56 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
2 answers
2k views

How to sort by popularity in magento 2 product list?

I want to sort products by popularity and discount(high to low). How can I achieve?
Vinod Kumar's user avatar
  • 2,045
3 votes
0 answers
177 views

Magento 2.4.4 upgrade after custom sorting filter Ascending/Discending order not working with porto theme?

I have upgrade Magento version 2.3.7 to Magento 2.4.4, before upgrade custom sorting option is working fine.after upgrade popularity asc/desc sorting is not working. we are currently using smartwave ...
pankaj parmar's user avatar
3 votes
1 answer
2k views

Position sort order for products in any category not working on Magento 2.4.1-p1

Magento 2.4.1-p1 9 extensions from Amasty Smartwave Porto theme I just noticed that assigning position numbers to products in any category does not reflect on the front page = it does not sort based ...
Allysin's user avatar
  • 178
3 votes
0 answers
47 views

Magento 2 - Sort Products by newest

I need to sort the products in categories by newest. I've tried to do it with modifications on Models, but don't works.
Raphael Cordeiro's user avatar
3 votes
0 answers
700 views

Magento 2.1.10: Sort by Special Price doesn't working

I'm working on category page, and try to sort the products collection by Special Price. I've override setCollection() of \Magento\Catalog\Block\Product\ProductList\Toolbar And the result is the only ...
fudu's user avatar
  • 1,258
2 votes
0 answers
87 views

Magento2: What is relavence sorting on search result page?

I want to know what is Relevance sorting in magento search result page, how it is working to sort the products
Purushotam Sharma's user avatar
2 votes
1 answer
41 views

Apply Check on default sort by options

I just need to apply a check on the default Sort By options. Not on all. only one. That when the user is not login, he cannot sort products by price. Anyone having any idea how to do it. Thanks
Zeeshan's user avatar
  • 181
2 votes
0 answers
251 views

Magento 2 REST API: Show In-stock products first in product listing API

I am looking into a headless magento approach. I am using the following API to list the products in a given category: V1/products?searchCriteria[filter_groups][0][filters][0][field]=category_id&...
Fokker's user avatar
  • 375
2 votes
0 answers
1k views

magento 2 : Product listing default sorting order based on attributes

i have add sort by attributes to products say like below one. "Publish date" "Product Name" "Price" Now i want to change sort order based on default attributes. For eg 1: Publish date -> Descending ...
user1799722's user avatar
2 votes
0 answers
176 views

Best seller sort order pagination query string not working correctly

our website having two sort order. one is position and another is best seller. but when i select the best seller sort order that time showing all the best seller products. but problem when select ...
pramod24's user avatar
  • 521
2 votes
1 answer
313 views

Sorting by Custom Attribute value/id

I'd like to add a custom attribute to listing products toolbar. This is a dropdown attribute, that looks like this: Available today Available in 1-5 days Available in 5-10 days I have set "Used for ...
zekia's user avatar
  • 620
1 vote
0 answers
166 views

Magento2 PLP / SLP - Custom Sort Option doesn't work with ElasticSearch

I am facing one issue in my Magento 2.4.0 Commerce project. Please let me know if anyone has faced this before and you have any solution. It is coming when I try to add a non-product attribute or ...
Nits's user avatar
  • 2,476
1 vote
0 answers
1k views

Default sorting options Sort by 'rating' not working in Magento 2.4.1 in ElasticSearch 7.x

I have installed Magento 2.4.1 Open source edition with Elastic Search 7.x version. Magento admin -> Stores -> Attributes -> Product Find default 'rating' attribute and set 'Use in filter ...
sandip's user avatar
  • 3,944
1 vote
0 answers
196 views

magento 2 sort child products according swatches in product view page

I wanna sort the child products of configurable according to display swatches. I wanna sort the child products in product page. Product page swatches display like this Green,White,Black When I use my ...
Niraj Patel's user avatar
1 vote
0 answers
46 views

Sorting Products at Category Page

Is there a way to bulk update products position at Category Page importing a CSV file via System -> Data Transfer -> Import ? Cordially, Daniel Mas
Ginoi Marketpace's user avatar
1 vote
0 answers
406 views

How to sort product by position, if every product has same position?

I read somewhere that if all product has same position it will sort by product id, but I don't think its sorting by Id. Here are a few screenshots I am sharing which I am sorting by position problem ...
Sagar Parikh's user avatar
1 vote
1 answer
2k views

Magento 2 - Custom sort order not working properly

I have created a custom plugin for sorting options for high to low & low to high price. High to low sort works fine but "low to high" sort order not showing correct results. app/code/Digital/...
Shoaib Saleem's user avatar
1 vote
0 answers
54 views

How to remove default options from sort order list?

How can I remove default options from de sort by list? For example, see the image? Is it possible to remove Best Sellers from the list?
Jeroen Baas's user avatar
1 vote
0 answers
676 views

Magento 2 sorting configurable products by special_price is not working

I have simple and configurable products on listing page. I am using special_price attribute for sorting. It is working for simple products but not working for configurable products. I have assigned ...
Vinod Kumar's user avatar
  • 2,045
1 vote
0 answers
395 views

Magento 2 Product Collection add array as column for sorting

I've requirement like following. Products price is calculated on the fly and I want price sorting to be proper with it. I've extend the block Magento\Catalog\Block\Product\ListProduct Following is ...
Kaushal Suthar's user avatar
1 vote
1 answer
1k views

Sort products in ascending order by name on specific category page not working

I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end. For a category under Display Setting, I have set Default ...
Kevin S's user avatar
  • 169
1 vote
0 answers
57 views

how to sorting product in listing page by group product in magento 2

How do I show all group product first in the product listing page first and then the rest of the product shown
Shubhajay Das's user avatar
1 vote
0 answers
72 views

Sort product in research result in BO

how can I change the default sorting order from the position to the order of the category ? In my result, I have some product of the Category 2 that appeared before the Category 1 (probably because I'...
Morgan Tartreau's user avatar
1 vote
1 answer
480 views

Magento 2.2 - Products sort by URL issue

I am facing category page url issue when try to sort products by Price (low to high) or (high to low). I'm using below code to add Price options (high to low). <option value="<?= /* @...
Shoaib Saleem's user avatar
1 vote
1 answer
703 views

Magento 1.9 - Product collection sort by price not working fine

This is my product collection. $collectionWithRank = Mage::getResourceModel('catalog/product_collection') ->addCategoryFilter($cat_data) ->addAttributeToSelect('*') ->...
Ejilarasan J's user avatar
1 vote
0 answers
408 views

While sorting my product collection automatically shuffeling

For Magento 2.2 I'm using:- $categoryId=185; $ct = $_objectManager->create('Magento\Catalog\Model\Category')->load($categoryId); $collections = $ct->getProductCollection() ...
Wakar Ahamad's user avatar
0 votes
0 answers
24 views

Magento 2.4.0 Sorting by custom eav attribute

I have a index that adds eav values ​​to products and it adds the correct values, these eav attributes are used to sort the product catalog, but this sorting is not correct, it started with a value of ...
RatajX's user avatar
  • 1
0 votes
0 answers
31 views

magento 2 sort by name is not showing full products

Magento 2.4 on the category page when sort by selected is name then products are not showing all products sort by position is working fine sort by price is working fine Example Total 31 products in X ...
sumeet bajaj's user avatar
  • 1,266
0 votes
1 answer
447 views

Magento 2.4.3-p1 custom sort by option with custom entity id not working

I have created a custom sorting option distance in magento 2.4.3-p1 and sort the collection with custom sorted entity ids di.xml `<type name="Magento\Catalog\Model\Config"> <...
Divya Rawat's user avatar
0 votes
1 answer
66 views

Magento Cloud - Cannot sorting products list by min_price DESC or ASC

I'm developing a website using Magento Cloud. I created 2 new sort-by options as attachments below: When I select sort-by "Price Low to High" or "Price High to Low". I always ...
Nguyễn Hoàng Tuấn's user avatar
0 votes
0 answers
954 views

Magento - Product Listing Sort By not working

For reference, I am working with Magento 2.4 I have tried the solutions from other posts on this forum and online and I cannot seem to get my magento app products sorted in the order I want. I have ...
Slippy's user avatar
  • 1
0 votes
0 answers
1k views

custom sorting is not working in magento 2.4.3 p1

enter code hereI am created a custom sorting in magento2.4.3p1 but it is not working in the frontend. I am face issues is We can't find products matching the selection. Toolbar.php <?php namespace ...
Japharul Alam's user avatar
0 votes
2 answers
41 views

Add a new sort by option

I want to create a new sort by option, wich is best sellers... how can i do it ? I've found this in the admin but i can't create a new option here...
Felipe Tarran's user avatar
0 votes
1 answer
78 views

Magento2 product distance sort and filter

I need a custom extension for Magento2 - sort and filter product distance with map. Its extension for m1 i needed to m2 I try converter code m1 to m2 but - but lack of knowledge ( Please help anybody, ...
Amadine's user avatar
0 votes
1 answer
1k views

Magento 2 | Change sort order for search results

I would like to set as the default order in the search results page "relevance" in descending order. How can i do? Thanks
Jackom's user avatar
  • 441
0 votes
1 answer
219 views

Magento 2: Unable to change category sort direction to descending

I've been unable to change the default sort direction for a category to descending. I've tried putting the XML in different files but none have had any effect. The first thing I tried was using "...
Daniel Andersson's user avatar
0 votes
0 answers
993 views

Magento 2.4: Add Sort by Quantity (not stock status) on Category Page

I'm working on Magento 2.4.2 with Elasticsearch 7.6. I've tried to add a sorting option on the category page which will sort the products on the basis of quantity added in the product. I've checked ...
Sumit's user avatar
  • 4,825
0 votes
1 answer
700 views

Order by price not working - Product listing

I have searched along the web for the solution and I have not found yet. Let me give you the context a little. I'm using Magento 2.3.6, where we got around 57800 products. When you go to the category ...
Trimes's user avatar
  • 38
0 votes
2 answers
982 views

Sort products by In stock in magento 2.4

Can we sort products In stock only. see the below screenshot.
kiran's user avatar
  • 547
0 votes
1 answer
575 views

Magento 2.4 : Sort Product by attribute value

i have configurable and simple product in my website with Attribute color: (Values - Red, Green, Blue) I want to sort product on the listing page with specific attribute value, for example, all ...
user1799722's user avatar
0 votes
1 answer
224 views

Column 'created_at' not imported

My goal is to sort products on the frontend from newest to oldest. The products CSV file contains the created_at column (e.g. 2020-10-31 14:05:44). Format seems to be correct. After the standard ...
Georgian's user avatar
0 votes
1 answer
190 views

Category Products - Sort By Newest

Since upgrading to Magento 2.4x and having to use ElasticSearch as default, I am unable to find a way to sort category products by newest (created_at). I have tried enabling used_in_sort_by for ...
Chris Oliver's user avatar
0 votes
1 answer
122 views

Unable to sort PLP with Configurable products based on discount (special_price)

I have configurable products in my PLP and I want to sort with "special_price" attribute. I edited the special_price attribute from admin and allowed it to be sortable in storefront. But I ...
Narendra Vyas's user avatar
0 votes
1 answer
47 views

Order by SKU problem

I am trying to order products by SKU but I got it wrong The order is on the Order page (Checkout) This is a snippet of my code $this->_items->getSelect()->order('main_table.sku ASC'); $this-...
Ahmed Chouihi's user avatar
0 votes
1 answer
240 views

Magento 2- Product list sorting issue for alphanumeric product name

I am facing problem in product list sorting by product name if the name is alphanumeric, Such as "Facewash, 50ml", "Facewash, 200ml" and "Facewash, 500ml". Expected result:- "Facewash,50ml", "...
Aatif's user avatar
  • 71
0 votes
3 answers
779 views

Magento 1.9 - How to set PLP Page Sort By Ascending order in back-end?

How to set sort by position Ascending order by default in the backend.
zus's user avatar
  • 155
0 votes
0 answers
176 views

Default sorting option not working in magento 2.2.7?

I am using the default sorting option as product name but when the page loads for first time it is not working. It's only working when selecting an option from the sorting dropdown.
Arul's user avatar
  • 309
0 votes
0 answers
298 views

Magento 2 : on page load product sorting not working

When I go on the category page, sorting does not work unless I select any value from dropdowns like position or price then it sorts the product. http://prntscr.com/q97trw Can anyone help me how can ...
Anees's user avatar
  • 624
0 votes
1 answer
386 views

Magento 2: Display out of stock items in the end in API

I am using a headless magento 2 approach for my store. I have made an API which accepts parameters like: category_slug, sort_by, sort_order, page_size, current_page and returns the products ...
Fokker's user avatar
  • 375
0 votes
0 answers
939 views

magento 2.3.1 - How to sort product name, price in ascending order in search result page?

Below is my search result page sort by product name in result page. Products are sorting by name by Z to A. I want to show the products in A-Z order when user click Product Name sort By option.How ...
Mujahidh's user avatar
  • 2,701