Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 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,225
0 votes
1 answer
286 views

Why Out of Stock Products showing at end of list in Magento 2.4.5?

We have created a category page and assigned some products to that category page. We have also assigned some out-of-stock products. But when we sort products by price the out-of-stock products show at ...
Chirag Prajapati's user avatar
3 votes
0 answers
162 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
0 votes
1 answer
373 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
57 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
879 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
39 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
67 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
1 vote
1 answer
142 views

Multiple sorting, get first count of sorting

I want to know the count of the first sort of listing product in categories. I override /vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php to /app/code/Vendor/Module/Rewrite/...
Diego Castro'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
  • 421
1 vote
1 answer
607 views

Product position in category not saved correctly

I have a strange problem in our Magento 2.4 installation. In a product category you are able to specify the position of a given product by entering a value in the position column. This helps to ...
Gunnar's user avatar
  • 51
0 votes
1 answer
202 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
2 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
  • 128
0 votes
0 answers
956 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,815
1 vote
0 answers
151 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
0 votes
1 answer
631 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
1 vote
1 answer
159 views

Magento 2.3.5: Sorting Products with text type attribute with Flat Catalog Product Function on causes wrong sorting

I created a text type attribute called display_order with the following settings. Catalog Input Type for Store Owner - Text Field Used for Sorting in Product Listing - Yes The display_order text for ...
user2240778's user avatar
0 votes
2 answers
934 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
  • 527
0 votes
1 answer
2k views

Magento 2: Sort category page collection by custom attribute

I need to sort the product collection in category page by a custom attribute inventory_status. The attribute is of type int. I need to add the sort with the existing sorting applied. For example, if ...
GenZ Dev's user avatar
  • 590
0 votes
1 answer
548 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
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,914
1 vote
0 answers
179 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
2 answers
3k views

Magento 2.4.1 sort by newest not working

I am using Magento 2.4.1 search engine is elasticsearch7 selected in catalog config. I wanted to add custom sorting options on the category page like sort by price low to high and newest etc. Now I am ...
Klaus Mikaelson's user avatar
0 votes
1 answer
216 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
3 votes
3 answers
2k views

Elastic Search (v7) changing Magento default product sort position in categories

We have installed Elastic Search 7 on a server running a Magento 2.3.5-p1 store and we can test it is successful (both in Magento 2 backend and on CLI) but when it is enabled, it changes the default ...
zigojacko's user avatar
  • 1,753
0 votes
1 answer
181 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
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
0 votes
1 answer
117 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
46 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
223 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
1 vote
3 answers
4k views

Set Default Sort By Name using Layout in Magento 2

I have added the listing of products on the custom page. By default sort by is Position. I have to change it to By default by Name. <referenceblock class="Magento\Catalog\Block\Product\ListProduct"...
m2dev's user avatar
  • 63
0 votes
3 answers
743 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
  • 145
0 votes
3 answers
1k views

Magento2: How to remove default sort option from category page?

I want to remove the default sort option from the category page. I have tried the below code but is not working. unset($options['position']); unset($options['name']); unset($options['price']); ...
Masud Shaikh's user avatar
  • 1,159
1 vote
0 answers
369 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
0 votes
0 answers
171 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
2 votes
3 answers
2k views

Magento 2.3 Natural Sort Order for Numeric Attributes / Sort Order Wrong

I have a custom attribute (text field) - let's call it "size". It contains numeric values like 1,2,3,10,20,30. Products are sorted by this attribute on the category page. Expected sort order: 1,2,...
Stefan's user avatar
  • 33
1 vote
1 answer
1k views

Sorting attributes are not working Magento 2.3

I'm trying to apply sorting from the toolbar on listing page, but none of the sorting properties like price, new, name etc. are working. As you can see I have applied sort by price, but it's not ...
AjayKr's user avatar
  • 135
0 votes
0 answers
284 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
4 votes
1 answer
3k views

Magento 2 how to use elasticsearch for custom indexer? Custom sort stops working after enabling elasticsearch

I am a magento newbie and trying to implementing a custom sort on product listing page with the help of this: https://magento.stackexchange.com/a/230983/84727 On top of the solution i have built a ...
Vivek V. Bharos's user avatar
4 votes
1 answer
696 views

Sort by product name not working as expected

I've bunch of products, Which names start with word "Bai" and afterwards some digits. Like, Bai-10, Bai-11, Bai-15 etc. I've set Default product listing sort by to "use config setting" and at ...
anonymous's user avatar
  • 3,724
2 votes
0 answers
84 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
3 votes
1 answer
1k views

Magento2 - catalog product listing collection sort by price with dynamic price calculation

product price is calculated dynamically based on certain conditions. while sorting with price it takes only default price not dynamically calculated price. the same issue with the price filter. I can ...
Shailesh Katarmal's user avatar
1 vote
1 answer
2k views

How to change products sort order in magento 2?

In product list page I need to change the sorting order. I have a current order like: Description A-Z Price High To Low Price Low to High Description Z-A I need to change it to. Description A-Z ...
Ramesh KR's user avatar
  • 836
0 votes
1 answer
369 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
2 answers
799 views

Magento 1.9: Change product order and direction on load?

I need on load product order newest and order desc , right now I need to filter it manually and for direction I need to click on arrow twice at product listing....Is there any way to do it ...
Pranav Patel'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
0 votes
1 answer
200 views

Magento 2 What is the different between setDefaultOrder and SetSortBy in layout xml?

I'm trying to set a default sort order to products listing in category page. I have seen people suggest using <action method="setDefaultOrder"> <argument name="...
Magento Learner's user avatar
1 vote
0 answers
50 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
3 votes
0 answers
46 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