Questions tagged [product-sorting]

Denotes question regarding Magento Category Product sorting

Filter by
Sorted by
Tagged with
0
votes
0answers
15 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 ...
0
votes
1answer
19 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 ...
0
votes
0answers
15 views

How to set null attribute value of product in last in sorting on product listing page in Magento 2?

when I sort product by attribute name (sequence_attribute) on the product listing page then I will get the null value product first, but I need it in last. I have to ignore the null attribute value. I ...
0
votes
0answers
24 views

Magento 2 : Catalog Search With Elastic Search Engine does not take into account entity_id

By default when configuring the Mysql Search Engine on category pages besides the selected sort products were also sorted by entity_id desc. When configuring Elasticsearch as the search engine this is ...
0
votes
0answers
10 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
10 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
15 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
10 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
24 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
34 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
30 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", "...
1
vote
3answers
403 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
109 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
99 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
31 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
47 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
55 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.
1
vote
2answers
402 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
461 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
82 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
609 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
187 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
162 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
36 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
3
votes
1answer
448 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 ...
1
vote
1answer
394 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
35 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
367 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
494 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
74 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
24 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
39 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
638 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
296 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
193 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
599 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
520 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
46 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
92 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
735 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
417 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
726 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
600 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
312 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
602 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'...