Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

Filter by
Sorted by
Tagged with
1
vote
0answers
16 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 ...
0
votes
0answers
10 views

Set Category default sort order to custom option

I have created a module that removes default Category product listings sorting orders and adds new custom ones. How do I go about setting one of the custom sortiong options as a Default one? Right now ...
0
votes
0answers
11 views

magento 2 : multiple sorting on child product collection

I am creating child product collection and I want to show simple products order by in stock by asc and also updated time by desc. like, show out of stock items and latest time of out of stock item. ...
0
votes
0answers
19 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.
0
votes
1answer
59 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,...
0
votes
0answers
43 views

Magento 1.9 - Product sorting Low to High not working properly

I added a custom price sort order(Low-to-High & High-to-Low) in M2. High to low works fine on all categories pages but Low to High sorting showing correct products result with few categories, not ...
2
votes
2answers
785 views

How to restore 'sort by position' option for category sorting

In our store the sort by position (ie 'Best Value') option is not being shown when viewing categories. I believe this was removed/hidden by someone in the past but now we want to show it again. I ...
1
vote
1answer
56 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 ...
0
votes
0answers
29 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 Like in this URL https://...
1
vote
0answers
93 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 ...
0
votes
0answers
64 views

Sort by price is not working as expected in Magento 2.3.3 product listing page

Sort by price is not working properly in Magento 2.3.3. It's showing the random price on listing page. I tried Sort by price is not working as expected in magento 2.2.7 product listing page and https:/...
3
votes
1answer
756 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?
4
votes
1answer
57 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 ...
2
votes
0answers
30 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
0
votes
0answers
12 views

Is category attribute sorting only available in the enterprise edition?

My developers will be upgrading our site to Magento 2.3 soon but have said that attribute sorting like the below is only available in the enterprise edition, can someone confirm? https://docs.magento....
3
votes
1answer
174 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 ...
0
votes
0answers
13 views

Magento 2: Category Pages custom sortby: getCollection()->order(…) not taking effect

So I have a bit of an issue. I am trying to create a custom sort order in the magneto 2 catalogue pages using a calculation between two price fields. I am currently editing Magento\Catalog\Block\...
1
vote
1answer
105 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 ...
0
votes
1answer
25 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 ...
0
votes
2answers
53 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 ...
0
votes
1answer
388 views

Magento2 Catalog search result and product listing grid only sort by product name set

I need below condition to my website. Magento2 Catalog search result and product listing grid only sort by product name to be set. I have also back-end configuration done but issue is like product ...
0
votes
1answer
208 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/...
0
votes
0answers
21 views

Magento2 Product counting in toolbar coming incorrect after implementing custom sort by rating

I have implemented a custom sorting of rating by creating a plugin <type name="Magento\Catalog\Block\Product\ProductList\Toolbar"> <plugin name="before_set_collection" type="Vendor\...
0
votes
1answer
47 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="...
1
vote
0answers
20 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?
2
votes
0answers
32 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.
1
vote
3answers
214 views

How to print Product collection mysql query in magento2

In my product page Price sorting not works properly. So i need to know which field value consider for sorting ? the issue occurs in configurable products.How do I print the actual MySQL code that gets ...
1
vote
0answers
129 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 ...
2
votes
1answer
23 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
2
votes
0answers
50 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 ...
0
votes
0answers
412 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 ...
0
votes
1answer
347 views

Magento 2: How to sort product on Category page by entity id in desc order?

I need to show all the newly created products on top. So need to arrange all the products according entity id in descending order
1
vote
0answers
38 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 ...
2
votes
0answers
57 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&...
0
votes
0answers
120 views

Product Sorting not working Magento 2 product listing page

I have created a custom module to remove duplicate products from product listing page for that i have overridden the Magento\Catalog\Block\Product\ListProduct file using di.xml file. But the problem ...
0
votes
1answer
438 views

Product Sort By Price: Low to High and High to Low Magento2.3

Can you suggest me how to change the sorting option on my site? I am using Magento 2.3.1.
3
votes
2answers
292 views

Magento 2 - Get Collection using custom product Ids and also sort them as the same order as product Ids passed

I need to get the collection using custom product Ids but it should sort the collection based on the sequence product Ids given Here is what I am doing now, but it is not sorting in sequence $...
0
votes
0answers
88 views

Make Relevance sort order available for sorting catalog product list through admin panel

I am using Magento v 2.3.0 While working with the search issue I found out that magento search list the products with relevance sort order but as soon as you go to next page the default sorting option ...
1
vote
1answer
401 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 ...
1
vote
0answers
20 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
0
votes
0answers
32 views

Magento Product Listing Sort By not working on some category

The issue is that on some of the category pages the Product Listing Sort By is not working while on some it is working. I appreciate all the help you can give. The Magento version is 1.9.3.0
2
votes
1answer
243 views

Help with Magento 2.3 custom product sort plugin

I have tried to implement a custom sorting plugin in Magento. Namely, with the options: Price (Low > High) Price (High > Low) Name (A - Z) Name (Z - A) Now, I have the plugin installed and ...
0
votes
1answer
319 views

magento 1.9 how to get the associated products of a configurable sorted by super attribute position?

I need to get all the simple products associated with a configurable, but sorted by the super attribute position, for example, size. If I have $parent_product, I need $child_s, $child_xl, $child_m, $...
0
votes
0answers
639 views

Magento merge two collections with different sorting orders

I have one store in Magento 1.9 , There is a listing page with AJAX scroll loading, on first page I am showing 24 products. We are showing products with label In-Stock and Sold Out, In-stock products ...
1
vote
0answers
53 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'...
1
vote
1answer
214 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="<?= /* @...
1
vote
1answer
291 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('*') ->...
0
votes
0answers
90 views

how can i sort by using option value not option id value in listing page magento 2?

I have created a custom dropdown attribute and set in sort by dropdown listing page, now currently magento 2 sort by using option id like "name="option[value][139][0]" but i want to sort using option ...
0
votes
1answer
185 views

Sort Product Collection By Event Date Custom field

I have created Events type products using Magento Virtual Product. A custom product attribute "event_date" has created to mark the event as Active or Past event. If the event_date field value is a ...
1
vote
0answers
767 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 ...