Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

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

Automatically show in stock at top of listing, out of stock and no image products at bottom

In Magento 2.3.3. I want to show automatically in stock products at the top of product listing while out of stock products and products with no image should be at the bottom of product listing. I have ...
0
votes
0answers
9 views

Magento 1.9 wrong price indexed for configurable products

In my project some configurable products min_price,max_price and minimal_price are wrongly indexed in catalog_product_index_prices. Because of this, Sorting with price in listing is always bringing ...
1
vote
0answers
12 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
0
votes
1answer
9 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 ...
0
votes
0answers
17 views

Magento 2: How to sort products by discount

I want to add a new custom option "Discount" inside Sort By dropdown on category page so that I can sort the discounted products from sort by options. Please help, How can I implement this ...
0
votes
0answers
13 views

False order when Float number

I am trying to sort products in correct order in Checkout cart ; while It is correct for different products but when the case for products having this form 'BrandName' ProductName 1,25 kg I got ...
0
votes
0answers
33 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-...
0
votes
1answer
26 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", "...
0
votes
3answers
157 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"...
0
votes
3answers
60 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.
0
votes
2answers
69 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']); ...
1
vote
0answers
25 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
13 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
32 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
38 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
253 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
270 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
55 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 ...
2
votes
1answer
321 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
135 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
96 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
35 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
352 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
15 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
202 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
31 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
240 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
87 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
383 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
1answer
60 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
22 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?
3
votes
0answers
36 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
446 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
234 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
24 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
130 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
543 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
463 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
42 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
81 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
1answer
629 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.
4
votes
2answers
370 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 $...
1
vote
1answer
625 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
21 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
2answers
516 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
286 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
514 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, $...
1
vote
0answers
55 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
250 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="<?= /* @...