Questions tagged [sort]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
22
votes
3answers
28k views

Magento 2 custom grid column sort order

I made a custom grid in Magento admin using the UI Component. Basically, all is working fine, besides the order of the columns that is not showing right. as you can see the action column is right at ...
6
votes
4answers
12k views

How to Change Sort by option in Filter Magento 2

I want to custom sort by option in category Filter. Currently Magento 2 provide Position , Product Name , Price And Sorting option to low to high. But i need to change all sorting option Like Price ...
5
votes
1answer
536 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 ...
5
votes
1answer
636 views

How do I make this custom expression column I have developed for the customer grid display sortable?

I'm trying to add an expression column to collection in customer grid. But it not sortable. I'm not sure that using addExpressionAttributeToSelect or addExpressionFieldToSelect function can solve this ...
4
votes
3answers
4k 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 ...
4
votes
2answers
3k 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 ...
3
votes
5answers
8k views

product collection sorting by price is not working

I want to sort the product collection by price. For this i am using ->setOrder('price', 'DESC') or ->addAttributeToSort('price', 'DESC') is not working but it is working with ->...
3
votes
1answer
7k views

How to reset a specific order by column?

I have a product collection that use a addAttributeToSort. Now there exists a sort filter in the frontend to sort products e.g. for price or date. When I click that filter in the frontend I have to ...
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.
3
votes
2answers
1k 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. ...
3
votes
2answers
2k views

Magento 2.1 Product Sorting Alter name and price with asc and desc option

File path: app/design/frontend/<vendor_name>/<theme_name>/Magento_Catalog/templates/product/list/toolbar/sorter.phtml I want to alter Sorting options as Name to Alphabets ASC, Alphabets ...
3
votes
0answers
665 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
1answer
770 views

Magento PDF Print out Totals Sort order

Is it possible to change the sort order of the totals in the PDF Print outs? I would like to have the "Minimum Order Bedrag" under "Subtotaal". I did manage to change it for the checkout page since ...
2
votes
3answers
4k 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" : "...
2
votes
2answers
987 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 ...
2
votes
1answer
111 views

How to sort Response alphabetically in magento 1.9?

Here I wish to sort my response alphabetical to the college names : if($collegeid!=null) { $res['status'] = true; $res['message'] =...
2
votes
1answer
868 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 ...
2
votes
1answer
562 views

How to set Sort Order for PayPal Credit?

I've been trying to set the sort order for PayPals pay with credit option. In the admin you have the option to Enable Paypal Credit but no sort order setting. Also in the database there's no sort ...
2
votes
0answers
1k views

Magento 2: How to define Order of Events?

In my events.xml I have so 4-5 Observer With Events. I would like to Define Their Call Order <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
1answer
1k views

Magento 1.9.2 Sort attribute by position

I have the following code but need to sort by the position value set for each attribute option in the back end. $this->_optionCollection = Mage::getResourceModel('attributepages/...
2
votes
0answers
609 views

Sort products by date DESC as the base sort order on category page?

For example, below products are created in sequential order: A - oldest, added 5 months ago B C D E F - newest, added today Magento's default sort order seems to be by Date ASC with the oldest ...
2
votes
1answer
336 views

How to add custom category product position base on country and sort in Magento 1.9.x?

In Magento default catalog category product sort by position. I would like to add custom product position base on country in Magento CMS category. In the frontend product sort depending on the ...
1
vote
1answer
791 views

How to add custom field to Checkouts Total Sort Order?

I need to add my custom item to Checkout Total Sort Order in configuration page. I created custom price, which shown in checkout according to this manual https://indiestechtips.wordpress.com/2011/07/...
1
vote
1answer
221 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 ...
1
vote
1answer
1k 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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
3k 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 ...
1
vote
1answer
699 views

Is there a way to change the position of a product for all attributes it belongs to?

So if you sort with best value it uses the products position attribute in the category to decide the position. The lower the higher it appears on the catalog page and search page. We have a custom ...
1
vote
1answer
2k views

magento sort by price not working fine

sort by price is not working in magento 1.9 my site has just configurable products only . when i checked code it was using below code to load products $_productCollection=$this->...
1
vote
1answer
666 views

How to sort the Attribute Set list on the create new product

Can anyone tell me how to sort the order of attribute sets when creating new products in Magento. From question: How to sort the Attribute Set list on the Manage Products Grid dropdown menu? I can ...
1
vote
1answer
451 views

using calculated value in custom sort

I've been trying to apply this post: How to add dynamic field in magento collection? to my own simple scenario. I have implemented a rewrite of Mage_Catalog_Model_Resource_Product_Collection to ...
1
vote
0answers
13 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 ...
1
vote
1answer
44 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
0answers
51 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 ...
1
vote
1answer
137 views

How to Sort the categories alphabetically?

How to Sort the categories alphabetically?
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?
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
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
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\...
1
vote
0answers
29 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
125 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"> <...
1
vote
2answers
836 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 ...
1
vote
1answer
2k views

Sort by Price : Configurable products have wrong order

On category page, sorting by price return products in wrong order for configurable products. Lets say i have a product with 3 associated products with prices $10, $20, $30. The sort by price will ...
1
vote
0answers
34 views

Changing aprox 12000 image positions in magento automaticly?

I have a question. i have a magento webshop (1.9.2.2) containing aprox 12000 products. all these products have multiple images. Now we have the folowing problem: a lot of images have a wrong sort ...
1
vote
0answers
526 views

Magento 2: Update Billing Address info fields

Sometimes, when the checkout loads, the Region input field is out of position and is placed before all of the other inputs (before firstname input field) in both the Shipping Step (Shipping address) ...
1
vote
0answers
112 views

How to sort a category by its subcategories

i need to sort my products on the category page by thier subcategories can someone tell me what i am doing wrong with this? $this->_productCollection = $layer->getProductCollection()->...
1
vote
1answer
923 views

Add custom sort to sort products using name and price both

How can i add a custom sort to sort products in a category using the name and price both?
1
vote
2answers
215 views

All Categories with filter

I have searched many time for this problem, but I have not found a solution for this feature. I will show all available categories from specific store view as a list on a single page. The feature now, ...
1
vote
0answers
151 views

sort associated products of a configureable product

I have several configurable products with multiple associated products. I want to sort the associated products in the drop down on the product page. For example I have a size, I want to order them ...
1
vote
1answer
851 views

How to sort Product by it's parent category position

$sale_products = Mage::getModel('catalog/product')->getCollection(); $sale_products->addAttributeToSelect(array( 'image', 'name', ...