Questions tagged [sort]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 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 ...
0
votes
1answer
11 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($...
0
votes
2answers
326 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 ...
0
votes
1answer
21 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?
0
votes
2answers
50 views

Magento 2 - Sort by Brand and Position?

Is it possible to sort by A the Brand alphabetically and then B by Position Programmatically.
0
votes
0answers
116 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 ...
0
votes
1answer
22 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 ...
1
vote
1answer
40 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 ...
1
vote
1answer
76 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 ...
0
votes
0answers
16 views

customers sort admin doesn't work

Everything was working very well and out of nowhere, without making any changes, I was no longer able to sort clients by ID in the backend. I can't find any errors in the log files. Has it happened to ...
0
votes
0answers
169 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 ...
0
votes
1answer
36 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 ...
0
votes
1answer
46 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 ...
0
votes
1answer
126 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 ...
1
vote
0answers
28 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 ...
0
votes
2answers
30 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 ->...
0
votes
1answer
71 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('\...
1
vote
2answers
2k 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" : "...
0
votes
2answers
1k 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 ...
0
votes
2answers
172 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 ...
0
votes
0answers
41 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 ...
0
votes
2answers
196 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"> <...
1
vote
1answer
94 views

How to Sort the categories alphabetically?

How to Sort the categories alphabetically?
4
votes
2answers
2k 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 ...
0
votes
1answer
555 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/...
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?
0
votes
3answers
32 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 ( [...
2
votes
0answers
472 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 ...
2
votes
2answers
757 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 ...
1
vote
0answers
56 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
851 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 ...
3
votes
2answers
856 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. ...
0
votes
0answers
495 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 ...
1
vote
0answers
34 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 ...
1
vote
2answers
1k 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 ...
0
votes
0answers
139 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 ...
0
votes
0answers
378 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 ...
2
votes
1answer
667 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 ...
1
vote
0answers
73 views

How to change Product Listing Sort by custom select option? [closed]

In my module, I have created a select option with attributes. When I select an attribute, that attribute will be set to sort by default. How can I do that. I found Magento\Catalogfile\Block\Product\...
5
votes
1answer
339 views

How can i change order position of swatch in ascending Magento2

I want to change the sort order of size swatches. I have already put it in sort order from admin but I could not see any result in the front side. Actual Result Expected Result How can I sort it as ...
1
vote
0answers
28 views

Magento 2.1.9 broken sorting

On this online store - https://nammu.com/ Sorting is not working, all time gives random result for sort I checked and changed the settings in the admin panel, in the category section and in the ...
1
vote
1answer
2k views

Magento 2 layered navigation attribute option sort by name not number of products

My theme is child of magento blank. On default magento 2 layered navigation sort labels of attribute in layered navigation by Count number of products that exist with this attribute. I need to change ...
0
votes
2answers
28 views

Remove Free shipping option

Not sure how to remove free shipping option from sort by options. There is currently no free shipping products but it picks up all products, hence misleading. Thanks
1
vote
1answer
116 views

Set column admin grid become the first one to be sorted

I have a column in my custom admin grid like this: <column name="delivery_date_to" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date"> <...
0
votes
1answer
137 views

Can't use sort or change view in https

My site: discountirrigation.com The SSL was recently applied to all pages of the site instead of just the checkout. However, I can not sort or change the product layout view or select a product ...
1
vote
2answers
538 views

Multiple sort collection

When I am in the listening product when I mark order alphabet by name I want to use two attributes. First my attribute, later name. This is my structure name product: my_attribute name_product I ...
0
votes
1answer
26 views

How order Customer Attributes?

Magento 2 EE has customer attribute option, I want to know what are the segments and how add attributes to desired places ?
4
votes
3answers
3k views

Magento 2 Product Sort by Price as High to low

I set default sort by price in admin but still i need to sort price from high to low. Magento by default sort it low to high. i try to find option in admin but can't find that. can any one tell me ...
3
votes
2answers
2k views

Sort By Price: Low to High & High to Low using Magento 2

I want to add filter option: Sort By Price, Low to High & High to Low in sort by box.
0
votes
1answer
874 views

Sort attribute values in Backend in custom order

I need to sort my custom attribute values in alphabetical order. Magento ver. 2.1.2 Now my options are sorted by eav_attribute_option.sort_order and i need to sort them by eav_attribute_option_value....