Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

magento 2.4.1 Sort by product name not working as expected

I've some of products, Which names start with word "adidas" and some of products "Adidas" . Like, adidas Tiro 13 Short, adidas Techfit Bra, Adidas Techfit Bra12 etc. I've set ...
user avatar
0 votes
0 answers
18 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 ...
user avatar
  • 1
0 votes
0 answers
18 views

How can I modify logic for Sort by Lowest Price?

In my Magento store in the category page I display a grid of products each product contains used and new products. All configurable products are considered new, all used simples are considered used. ...
user avatar
0 votes
0 answers
17 views

How to add Custom Sorting option with created date on category page in Magento 2

I want to add Custom Sorting option with created date on category page in Magento 2. Like its label would be Newest Product and the product sort is based on product crated date. SS attached for more ...
user avatar
  • 526
0 votes
0 answers
405 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 ...
user avatar
0 votes
2 answers
23 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...
user avatar
0 votes
1 answer
38 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, ...
user avatar
1 vote
1 answer
62 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/...
user avatar
0 votes
0 answers
42 views

how add sort by max_price product Magento 2.4.2

How add max_price to aggregations on Elasticsearch? For use when code pass to: \Magento\Elasticsearch\Model\ResourceModel\Fulltext\Collection\SearchResultApplier::apply() I want sort by max price, ...
user avatar
0 votes
1 answer
202 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
user avatar
  • 297
0 votes
1 answer
92 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 ...
user avatar
  • 41
0 votes
1 answer
47 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 "...
user avatar
1 vote
1 answer
489 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 ...
user avatar
  • 306
0 votes
0 answers
35 views

Newest Sorting is not working Magento2.4 with elastic search

New Product first in category listing page does not work in Magento2.4 with elastic search.
user avatar
  • 3,069
0 votes
0 answers
473 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 ...
user avatar
  • 4,683
0 votes
0 answers
84 views

Custom sorting option with Elastic search (Highest Discount Percentage)

I need to add Highest discount percentage sorting option in magento 2.4.2. I have implemented with this code but it is not working with elastic-search $collection->getSelect()->columns(['...
user avatar
0 votes
0 answers
85 views

Show Latest/New products first on Category Pages - Sorting Order

I want to show New product first on category pages. Right now all latest products are showing in last pages of categories. But i want to show on first page. anyone can help me on this issue. I am ...
user avatar
1 vote
0 answers
47 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 ...
user avatar
  • 2,356
0 votes
1 answer
145 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 ...
user avatar
  • 28
1 vote
1 answer
102 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 ...
user avatar
0 votes
2 answers
553 views

Sort products by In stock in magento 2.4

Can we sort products In stock only. see the below screenshot.
user avatar
  • 409
0 votes
1 answer
856 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 ...
user avatar
  • 548
0 votes
1 answer
303 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 ...
user avatar
1 vote
0 answers
709 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 ...
user avatar
  • 3,572
1 vote
0 answers
96 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 ...
user avatar
1 vote
2 answers
2k 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 ...
user avatar
0 votes
1 answer
157 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 ...
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 ...
user avatar
  • 1,755
0 votes
1 answer
111 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 ...
user avatar
1 vote
0 answers
42 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
user avatar
0 votes
1 answer
58 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 ...
user avatar
0 votes
0 answers
41 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-...
user avatar
0 votes
1 answer
90 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", "...
user avatar
  • 71
1 vote
3 answers
3k 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"...
user avatar
  • 43
0 votes
3 answers
436 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.
user avatar
  • 95
0 votes
3 answers
626 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']); ...
user avatar
  • 1,127
1 vote
0 answers
107 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 ...
user avatar
0 votes
0 answers
109 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.
user avatar
  • 309
2 votes
3 answers
1k 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,...
user avatar
  • 33
1 vote
1 answer
969 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 ...
user avatar
  • 135
0 votes
0 answers
205 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 ...
user avatar
  • 584
4 votes
1 answer
2k 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 ...
user avatar
4 votes
1 answer
568 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 ...
user avatar
  • 3,664
2 votes
0 answers
53 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
user avatar
3 votes
1 answer
889 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 ...
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 ...
user avatar
  • 828
0 votes
1 answer
155 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 ...
user avatar
  • 375
0 votes
2 answers
675 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 ...
user avatar
0 votes
1 answer
1k 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/...
user avatar
0 votes
1 answer
157 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="...
user avatar