Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

Filter by
Sorted by
Tagged with
0
votes
1answer
19 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,...
1
vote
1answer
37 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
24 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
55 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
33 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:/...
4
votes
1answer
53 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
27 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
145 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
12 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
99 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
24 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
39 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
0answers
30 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 ...
0
votes
1answer
156 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
20 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
38 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
18 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
166 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
88 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
42 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
382 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
313 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
36 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
49 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
78 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
373 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
266 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
64 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
367 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
1answer
349 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 ...
2
votes
1answer
228 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
240 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
637 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'...
0
votes
0answers
31 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
1
vote
1answer
206 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
251 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
87 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
178 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
711 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 ...
1
vote
2answers
722 views

Change 'Sort by Position' text to 'Sort by New' Magento 2.2.6

This must/should be easily achieved...I am simply hoping to change the 'Sort By Position' text to 'Sort by New' in the Magento category list toolbar. I have attempted to do this by creating the ...
1
vote
2answers
470 views

How to Shuffle Product Collection in Magento 2?

I am getting products collection form multiple categories. I want to shuffle products everytime when function getProductCollection() is called. My function is: public function getProductCollection($...
0
votes
1answer
101 views

Desperately need Help with a task for a test in Magento 1.9.3

So guys, I'm doing this task for something very important to me but now I'm completely stuck. I need to fulfill this task: Create a module to output a nice list of the products that have a value ...
2
votes
0answers
102 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 ...
1
vote
0answers
339 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() ...
0
votes
1answer
41 views

Product List Issue

I'm having a problem with the product list in Magento 2. For the most part everything is working properly, but occasionally when I change the sort order to 'desc' or change the sort criteria to 'name' ...