Skip to main content

Questions tagged [sort]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

Add a new filter in sort "Available for purchase" in magento 2.4.6

I want to add a new filter added in "Sort" that will show all items that you are able to add to your cart and purchase.we have a good amount of items that can not be purchased online be we ...
Tisha Jhanwar's user avatar
0 votes
0 answers
23 views

In my magento 2.4.6, The product sorting for categories is not working. Like price high to low and low to high and sort filter is not working

In my magento 2.4.6, The product sorting for categories is not working. Like price high to low and low to high and sort filter is not working . Rest all other filters are working. When selecting ...
Tisha Jhanwar's user avatar
0 votes
1 answer
73 views

How to sort product attribute options in magento 2 programatically

I have Magento 2.4.5 cloud edition. I have a product attribute(brand) with 2000 options. When the Product is edited, the product options for a brand attribute are mixed up, and it is difficult to ...
Jayashree N's user avatar
0 votes
2 answers
68 views

Magento 2.4.5-p5 - Need to display out of stock products at last on category page

I am using Magento 2.4.5-p5, Out-of-stock products should be displayed at the bottom of category page. I also tried sorting the products. I set the sort order for products in the category within the ...
Ishu Kakria's user avatar
0 votes
1 answer
43 views

Magento 1.9 sorting media gallery images with base image on first page

From a product I want to get all the images it has in the gallery and sort them so that the main/base image of the product is first in the list. Firstly, I have a problem because I can't get the main/...
Franci Melink's user avatar
0 votes
1 answer
39 views

Action columns not displaying Edit options

<actionsColumn name="actions" class="Vendor\Grid\Ui\Component\Listing\Grid\Column\Action"> <argument name="data" xsi:type="array"> <item name=&...
Midhun M's user avatar
1 vote
2 answers
212 views

How to add custom sort like Most View and Best Selling products in API of Product List in Magento 2?

How do we add custom sorts like Most View and Best Selling products in the API of Product List in Magento 2? I need to add the most views and best-selling products in /V1/products to this API using ...
Devidas's user avatar
  • 3,378
0 votes
1 answer
1k views

created_at sorting not working in Magenot 2.4 using elasticsearch

I have created a custom sorting using created_at but result is empty. when i checked logs it shows error main.CRITICAL: {"error":{"root_cause": [{"type":"...
Prits's user avatar
  • 623
0 votes
3 answers
295 views

Magento ver. 2.4.3 sort attributes in additional tab on catalog product view

I need to re-order / sort the attributes on product detail page. They are sorted with there attribute_id but I don´t want to delete and recreate them. I know that the attributes can be sorted for the ...
guest123's user avatar
1 vote
1 answer
62 views

Sorting Street fields in magento 2.4

I am with a need to reorder 03 street fileds in the following order in shipping, billing, and customer address forms. street[2] - first street[1] - second street[0] - third I could reorder other ...
Indunil Ramadasa's user avatar
0 votes
0 answers
213 views

Magento 2.4.1 Custom sort option best sellers is not working

I have created a custom bestsellers sorting option, the query working fine but setOrder() and order() is not working, i want to sorting the values using qty_ordered <?php namespace Vendor\...
Ali's user avatar
  • 1
0 votes
1 answer
1k views

Add custom sort by options for magento 2 catalog

In magento 1, for my catalog Product List, in Toolbar.php already i added sorting class and in my catalog page - there was an option to sort products about these attributes: <?php class ...
Lerry's user avatar
  • 69
0 votes
2 answers
136 views

Magento 2.4 Custom Sort Order to Print Multiple PDF Invoices (Grouped Print sorted by Customer Name, then by order date)?

Is it possible to select a range of invoices, apply a sort (say by Customer Name), then to print the selected range in that order? We have customers placing numerous orders in a week that we list ...
Alun Morgan's user avatar
1 vote
0 answers
144 views

Plugins prioritization

The documentation mentions the sort order is always from lowest to highest, except when around plugins are used, then The around plugin’s method affects the flow of all plugins that are executed ...
Bogdan Tomi's user avatar
0 votes
1 answer
33 views

Fetch data and arrange sequence in given format

This is my array: <?php $sku = ['HH017','HH018','HH005','HH010','20OZHHTUMBLER', '30OZTUMBLER2','HH006','HH-05']; $sequence = ['HH005','HH010','HH006','20OZHHTUMBLER',...]; print_r(sort($...
IntraPersonalLearner's user avatar
1 vote
2 answers
8k views

How can I add "Sort by newest" and set it as default?

I'd like to add custom sort option "Sort by newest" using created_at system attribute and I'd like to set it as default, from the backend Stores->Catalog->Storefront->Product ...
KaMZaTa's user avatar
  • 235
0 votes
1 answer
421 views

How to sort ordering of store view change list in Magento 2.3.4

I want to sort alphabetically this store view change list. Can anyone help with how can I do this in magneto 2.3.4?
Shubhajay Das's user avatar
-1 votes
3 answers
1k views

Magento 2 - Sort by Brand and Position?

Is it possible to sort by A the Brand alphabetically and then B by Position Programmatically.
user91213's user avatar
0 votes
1 answer
1k views

Magento 2.4 Sort products by date

I've found topics about enabling sorting by date, this being one example but on 2.4 this does not work, even manually typing ?product_list_order=created_at in url does not get any results, is there ...
James Ambardnishvili's user avatar
0 votes
1 answer
615 views

Changing product's Sort By default

How do I change the default by which the products are listed in the catalog? I tried from the Admin Panel but didn't work. The current default is by "Product Name" but now I want to set my ...
luenib's user avatar
  • 135
1 vote
1 answer
158 views

It is possible to sort Email order confirmation by sku in both customer email notification and Admin email notification

I am on the m2 site. In order confirmation email I am getting SKU. But I need that SKU sort by ASC. Could someone assist me with this? Thanks in advance. I have overridden the below file in my theme ...
M2 Dev's user avatar
  • 73
2 votes
1 answer
708 views

Magento 2.3.5 - Category sorting is not saved when drag and drop

When we change the sorting of subcategories, by drag and drop in the admin panel, these new sorting is not saved. When we refresh the page, it randomize all subcategories and there is no logic in the ...
JGeer's user avatar
  • 1,422
0 votes
0 answers
1k views

Magento 2 - Unable to change category products position

In Magento 2.3.0, I try to change position for category products. In admin, each position is set but in the frontend, nothing changes. Even after clear/flush cache and reindexing. Do you know how ...
Fbr's user avatar
  • 177
0 votes
1 answer
717 views

Change order of widget catalog products list

I have a product in my product list, which must be at the top. After I have extended the product list, the product is unfortunately no longer at the top. I add the product list via the widget catalog ...
Jackridder's user avatar
0 votes
1 answer
332 views

Magento2: How to apply two sorting one magento default one and other sort by attributes?

I want to sort my products by attributes : that is working fine but I want to apply two sort together , like sort by name asc and sort by attributes asc also How can I implement this ?. Based on ...
user1799722's user avatar
0 votes
1 answer
805 views

sort order as newest product first option in products in category in category edit does not showing in magento 2.3.2

I want to sort category default sort as newly added SKU at top and oldest at last , this means new to old (SKU) default sorting in frontend of magento 2. But i am not able to see option => sorting ...
kannanwebtech's user avatar
1 vote
0 answers
178 views

How to make the null or 0 stored 0, not infinity in elasticsearch

I have define new eav attribute(Test_decimal) with 'decimal' type. The Test_decimal can sort in PLP and SRP. Added value to Test_decimal attribute for some products Run php bin/magento indexer:reindex ...
Amanda's user avatar
  • 11
0 votes
2 answers
307 views

Sorting repository by more than one attribute

I want to sort a repository by more than one attribute. Any ideas of how to achieve this? What I have so far is this: public function getLatestPosts() { return $this->postRepository ->...
Paloma Martinez Ocegueda's user avatar
0 votes
1 answer
453 views

How to sort the options of the dropdown attribute in magento 2

I am using the following code to get the options of the select attribute. Now I want to get the options that should be ordered alphabetically. file.php $eavConfig = $object_Manager->get('\...
Jaisa's user avatar
  • 2,636
2 votes
3 answers
8k views

Magento 2.3.3 main.ERROR: {"error":{"root_cause":[{"type":"query_shard_exception","reason":" No mapping found for ['attribute'] in order to sort on

I have just upgraded to Magento ver. 2.3.3 (from 2.2.8) with Elasticsearch and I am having an issue with my custom module regarding the sort by options. Elasticsearch information: { "name" : "...
Greg's user avatar
  • 2,749
0 votes
2 answers
5k views

jquery ajax sort response

I am showing ajax response in select options as below code. I want to sort the select options in alphabetical order of values. Please provide a solution to sort below data on values basis. My data ...
chanchal's user avatar
  • 417
0 votes
2 answers
256 views

Magento 2 sort by Attribute value

I have multi-select attribute name location like : Delhi , Maharashtra, Karnataka. I want to use sort by of filter by in such way when I use above filter / sort it should show all products but ...
user1799722's user avatar
0 votes
0 answers
75 views

Is it possible to sort Email order confirmation by SKU

My website is on MAGENTO 2 Any time that a customer send an order I received an email confirmation with SKU, DESCRIPTION, PRICE. But I need that this email report is sorted by SKU. is it possible? is ...
Teos_Staff's user avatar
0 votes
2 answers
933 views

Magento 2.3.2: Sort by Bestselling Minimal results

I am using custom code to implement sort by Best selling on the category page, I have created an around plugin for <type name="Magento\Catalog\Block\Product\ProductList\Toolbar"> <...
Nagamani's user avatar
  • 143
1 vote
1 answer
451 views

How to Sort the categories alphabetically?

How to Sort the categories alphabetically?
Junaid Ashfaq's user avatar
4 votes
2 answers
6k views

Custom sort by is not working with elastic search in magento 2.3

After upgrading magento 2.3 and enabling magento new feature elastic search 6, My custom module for sort by is not working. It is perfectly fine working with MySql option but not working with elastic ...
rnegi's user avatar
  • 41
1 vote
2 answers
2k 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/...
Shoaib Saleem's user avatar
1 vote
0 answers
64 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?
Jeroen Baas's user avatar
0 votes
3 answers
67 views

Sorting went fail for array

I am having the array of color attribute options... I would like to sort the array based on 'store0' key... I have used multisort and usort but its not working [821] => Array ( [...
1990rk4's user avatar
  • 593
3 votes
0 answers
1k views

Magento 2 :Change order of billing address

In the customer account section,how can i edit the order of address data(billing and shipping)(ie, i want to show customer company first and customer name second) https://prnt.sc/nucm3l I found this ...
Vindhuja's user avatar
  • 1,405
2 votes
2 answers
2k views

Magento 2 :Sort Attributes Alphabetically in layered Navigation

I want to sort the attributes in layered navigation in the alphabetical order. http://i.prntscr.com/zDuYTVDbSWqv_507ew0JbQ.png Sort in the order as:Climate, Color, ... I tried to override the ...
Vindhuja's user avatar
  • 1,405
1 vote
0 answers
80 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'...
Morgan's user avatar
  • 945
1 vote
1 answer
2k views

Magento 2 - Add custom sort by option in cattegory page and make it default

I have added custom sort by option "random" for category page. I have used following code to add random option: I have used plugin . app/code/DL/CustomSortOption/etc/frontend/di.xml <config ...
Mudasser Hayat's user avatar
3 votes
2 answers
2k views

How to reorder street address on checkout page in magento 2?

I am getting every field unordered on checkout page but I added code to sort them and now everything is sorting but the street address is not getting sorted I am getting a street address field on top. ...
Bhakti Thakkar's user avatar
0 votes
0 answers
770 views

How to change order of form fields in the checkout page in magento 2?

I want to change the order of form fields in the checkout page.I want to reorder these inout fields I referred this link Magento 2 - change the form fields sort order in checkout but I am getting ...
Bhakti Thakkar's user avatar
1 vote
0 answers
44 views

How can I show all products in a top level category sorting by the child categories?

I have this category structure below: When I access Men page all products of child categories are there, but they are showing in a random mode, i believe. I want to show the products in the main ...
Diego Queiroz's user avatar
1 vote
2 answers
3k views

how to sort stock by quantity in magento 2.3

In magento frontend i want to sort products by maximum quantity first to lower number of stock (Quantity sort in descending order) Please advise which module to be made and where to save the files i ...
shezan's user avatar
  • 53
0 votes
0 answers
253 views

Catalog Search Results page - sort by price not working

Steps to reproduce: Search for a term and the results are displayed by default sorted by Relevance. Change the sort by parameter to Price and change the sort to ascending order. Results are not ...
Balram's user avatar
  • 1
0 votes
0 answers
769 views

How to display categories in menu in the same order as in admin category tree?

I wonder if there way to have same sort order of categories in frontend menu as in admin panel category tree. I thought position attribute should be used for this goal, but I've found that categories ...
Dima Portenko's user avatar
2 votes
1 answer
2k views

How to sort a collection after load

I have a store collection. And it has the following fields [0] => Array ( [location_id] => 5 [title] => Los Angeles [description] => [status] => 1 ...
Nismath vi's user avatar