PageSourceSearch

https://mageplaza-docs.web.app/assets/js/d7ef4daa.9ebdf709.js

js mageplaza-docs.web.app collected 2026-10-03 13:35:09 UTC 32,705 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2746],{3905:(e,t,a)=>{a.d(t,{Zo:()=>m,kt:()=>k});var n=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function o(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),s=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),d=s(a),k=r,c=d["".concat(p,".").concat(k)]||d[k]||u[k]||l;return a?n.createElement(c,i(i({ref:t},m),{},{components:a})):n.createElement(c,i({ref:t},m))}));function k(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=d;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:r,i[1]=o;for(var s=2;s<l;s++)i[s]=a[s];return n.createElement.apply(null,i)}return n.createElement.apply(null,a)}d.displayName="MDXCreateElement"},5484:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>o,toc:()=>s});var n=a(7462),r=(a(7294),a(3905));const l={id:"index",title:"Better Sorting",sidebar_label:"Better Sorting",displayed_sidebar:"m2Sidebar",slug:"/magento/better-sorting"},i="Better Sorting",o={unversionedId:"magento/better-sorting/index",id:"magento/better-sorting/index",title:"Better Sorting",description:"Overview",source:"@site/docs/magento/better-sorting/index.md",sourceDirName:"magento/better-sorting",slug:"/magento/better-sorting",permalink:"/magento/better-sorting",tags:[],version:"current",frontMatter:{id:"index",title:"Better Sorting",sidebar_label:"Better Sorting",displayed_sidebar:"m2Sidebar",slug:"/magento/better-sorting"},sidebar:"m2Sidebar",previous:{title:"Better Product Reviews",permalink:"/magento/better-product-reviews"},next:{title:"Better Static Block",permalink:"/magento/better-static-block"}},p={},s=[{value:"Overview",id:"overview",level:2},{value:"Download &amp; Install",id:"download--install",level:2},{value:"How to use",id:"how-to-use",level:2},{value:"How to configure",id:"how-to-configure",level:2},{value:"1. Configuration",id:"1-configuration",level:3},{value:"1.1. General",id:"11-general",level:4},{value:"1.1.1. Discount",id:"111-discount",level:4},{value:"1.1.2. Bestseller",id:"112-bestseller",level:4},{value:"1.1.3. Most Viewed",id:"113-most-viewed",level:4},{value:"1.1.4. Top Rated",id:"114-top-rated",level:4},{value:"1.1.5. Reviews Count",id:"115-reviews-count",level:4},{value:"1.1.6. New Arrivals, Stock Quantity, Wishlist, Product Name, Price",id:"116-new-arrivals-stock-quantity-wishlist-product-name-price",level:4},{value:"1.1.7. Position, Relevance",id:"117-position-relevance",level:4},{value:"Notation",id:"notation",level:3},{value:"GraphQL",id:"graphql",level:3}],m={toc:s};
1function u(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,n.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"better-sorting"},"Better Sorting"),(0,r.kt)("h2",{id:"overview"},"Overview"),(0,r.kt)("p",null,"Better Sorting by Mageplaza will help customers have a compelling shopping experience, increase their ability to access and search easily and be friendly with customers. By supporting customers in arranging products by bestseller, most viewed, discount, reviews count, top rated, new, added to wishlist, stock (quantity), etc., the Better Sorting extension will boost your site traffic dramatically."),(0,r.kt)("h2",{id:"download--install"},"Download & Install"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://www.mageplaza.com/magento-2-improved-sorting/"},"Mageplaza Better Sorting")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://www.mageplaza.com/install-magento-2-extension/"},"How to Install"))),(0,r.kt)("h2",{id:"how-to-use"},"How to use"),(0,r.kt)("p",null,"Better Soring supports showing product by:"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/0yFl9Qu.png",alt:null})),(0,r.kt)("h2",{id:"how-to-configure"},"How to configure"),(0,r.kt)("h3",{id:"1-configuration"},"1. Configuration"),(0,r.kt)("p",null,"Login to the ",(0,r.kt)("strong",{parentName:"p"},"Magento Admin"),", choose ",(0,r.kt)("inlineCode",{parentName:"p"},"Stores > Configuration > Better Sorting"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/tjOLc2v.gif",alt:null})),(0,r.kt)("h4",{id:"11-general"},"1.1. General"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/XYJmmWu.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Enable"),": Select ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to activate the Module and you can sort product as the product types you want. "),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Show Out of Stock at the End"),": Here are the options")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/nX7WGwN.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Base on stock label"),": Display the ",(0,r.kt)("strong",{parentName:"li"},"Out of Stock products")," at the page bottom based on stock label. You can access to ",(0,r.kt)("inlineCode",{parentName:"li"},"Catalog > Products"),", then change ",(0,r.kt)("strong",{parentName:"li"},"Stock Status")," field into ",(0,r.kt)("strong",{parentName:"li"},"Out of stock")," for any products shown at bottom page even though it still remains in inventory. ")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/NyZgCOw.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"No"),": Not display the ",(0,r.kt)("strong",{parentName:"p"},"Out of Stock")," product at the page bottom.")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Base on qty (<1)"),": Display the ",(0,r.kt)("strong",{parentName:"p"},"Out of Stock")," products at page bottom based on ",(0,r.kt)("strong",{parentName:"p"},"product quantity (<1)"),". Please go to ",(0,r.kt)("inlineCode",{parentName:"p"},"Catalog> Products")," to change ",(0,r.kt)("strong",{parentName:"p"},"Quantity"),", if the product quantity is smaller than 1, those products will be shown at page bottom, otherwise, they will not be applied ",(0,r.kt)("strong",{parentName:"p"},"Sorting")," and hence display products as usual."))),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/uv9stNr.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Default Sort by on Search Page"),": Default sorting product on the search page. If the first sorting type is not enabled, the second one will be applied. For example, if the ",(0,r.kt)("strong",{parentName:"li"},"Discount")," Sorting type is not enabled, then the module will show product by ",(0,r.kt)("strong",{parentName:"li"},"Bestseller"))),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/0e7Nnoy.png",alt:null})),(0,r.kt)("h4",{id:"111-discount"},"1.1.1. Discount"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/vD8V9G6.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by Discount items."),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply ",(0,r.kt)("strong",{parentName:"li"},"Discount")," product on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page"),"."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by Discount."),(0,r.kt)("li",{parentName:"ul"},"This is a required field. "))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Base on"),": Select product sorting with Discount by:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Percent"),": Display products based on their percentage discount. Which one has more discount will be shown first."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Amount"),": Display products based on their fixed discount amount. Which one has more discount will be shown first."))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by Discount in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Category Page"),": ")),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/E5IXGNz.png",alt:null})),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Search Page"),":")),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/vttTCBg.png",alt:null}))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with Discount:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange discount products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange discount products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": With ",(0,r.kt)("strong",{parentName:"p"},"Sort By Discount"),", you can run this command to update the newest discount product data:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento indexer:reindex")),(0,r.kt)("h4",{id:"112-bestseller"},"1.1.2. Bestseller"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/v4UCSu8.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"Bestseller")),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply ",(0,r.kt)("strong",{parentName:"li"},"Bestseller")," product on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by Bestseller"),(0,r.kt)("li",{parentName:"ul"},"This is a required field"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Time base (days)"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number of days to sort the bestsellers. For example, if you enter 10 days, it means that the seller's product in 10 days most recently will be shown. Otherwise, you can access to ",(0,r.kt)("strong",{parentName:"li"},"Dashboard"),", click to ",(0,r.kt)("strong",{parentName:"li"},"Reload Data")," to see Bestseller Product. ")),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/RjiYtqC.png",alt:null})),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"If this field is left blank, the default is the entire time"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by Bestseller in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Category Page")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with Bestseller:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange Bestseller products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange Bestseller products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": With ",(0,r.kt)("strong",{parentName:"p"},"Sort By Bestsellers"),", you can run this command to update the newest bestseller product data:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento indexer:reindex")),(0,r.kt)("h4",{id:"113-most-viewed"},"1.1.3. Most Viewed"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/iZ21uhE.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed")),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed")," product on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed")),(0,r.kt)("li",{parentName:"ul"},"This is a required field"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Time base (days)"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number of days to arrange the ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed"),". For example: You enter 10 days means that the ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed")," product in 10 days most recently will be shown. Otherwise, you can access to ",(0,r.kt)("strong",{parentName:"li"},"Dashboard"),", click to ",(0,r.kt)("strong",{parentName:"li"},"Reload Data")," to see ",(0,r.kt)("strong",{parentName:"li"},"Most Viewed")," Product.")),(0,r.kt)("p",{parentName:"li"},(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/Oi5ERUq.png",alt:null})),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"If this field is left blank, the default is the entire time"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by Most Viewed in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Category Page"),(0,r.kt)("li",{parentName:"ul"},"Search Page"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with ",(0,r.kt)("strong",{parentName:"p"},"Most Viewed"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange Most Viewed products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange Most Viewed products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": With ",(0,r.kt)("strong",{parentName:"p"},"Sort By Most Viewed"),", you can run this command to update the newest most viewed product data:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento indexer:reindex")),(0,r.kt)("h4",{id:"114-top-rated"},"1.1.4. Top Rated"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/gUjuk89.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"Top Rated")),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply ",(0,r.kt)("strong",{parentName:"li"},"Top Rated")," product on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{paren
1tName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by Top Rated"),(0,r.kt)("li",{parentName:"ul"},"This is a required field"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by Top Rated in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Category Page"),(0,r.kt)("li",{parentName:"ul"},"Search Page"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with Top Rated:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange Top Rated products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange Top Rated products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("h4",{id:"115-reviews-count"},"1.1.5. Reviews Count"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/cyOv54b.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"Reviews Count")),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply ",(0,r.kt)("strong",{parentName:"li"},"Reviews Count")," product on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by Reviews Count"),(0,r.kt)("li",{parentName:"ul"},"This is a required field"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by Reviews Count in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Category Page"),(0,r.kt)("li",{parentName:"ul"},"Search Page"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with Reviews Count:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange Reviews Count products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange Reviews Count products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("h4",{id:"116-new-arrivals-stock-quantity-wishlist-product-name-price"},"1.1.6. New Arrivals, Stock Quantity, Wishlist, Product Name, Price"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/CBhEOJU.png",alt:null})),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/EUBt9D0.png",alt:null})),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/AHBODEZ.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Enable"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"selected sorting type")),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply this product type on Sorting but will apply the next enable product type as in ",(0,r.kt)("strong",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Label"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by selecting the sorting type"),(0,r.kt)("li",{parentName:"ul"},"This is a required field"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Apply On"),": Select to show product sorting by selected sorting type in:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Category Page"),(0,r.kt)("li",{parentName:"ul"},"Search Page"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with the selected sorting type:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange selected sorting products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange selected sorting products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": With ",(0,r.kt)("strong",{parentName:"p"},"New Arrivals"),", products can only be applied to this Sorting type when admin sets the field ",(0,r.kt)("strong",{parentName:"p"},"Set Product as New From")," for them. The products that have been in stock most recently will be displayed first and then come sooner in-stock products. For products that are not chosen in this Sorting type or have not been set up, the time at ",(0,r.kt)("strong",{parentName:"p"},"Set Product as New From")," field will not be considered as New Arrivals. Please access to ",(0,r.kt)("inlineCode",{parentName:"p"},"Catalog > Product"),", then choose to edit any product and go to ",(0,r.kt)("strong",{parentName:"p"},"Set Product as New From")," to set the New Arrivals. "),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/psMGD37.png",alt:null}
1)),(0,r.kt)("h4",{id:"117-position-relevance"},"1.1.7. Position, Relevance"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/dZkFXV1.png",alt:null})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Enable"),":",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Selecting ",(0,r.kt)("inlineCode",{parentName:"li"},"Yes")," to allow sorting products by ",(0,r.kt)("strong",{parentName:"li"},"Position/Relevance"),". With ",(0,r.kt)("strong",{parentName:"li"},"Sort by Position"),", only apply for ",(0,r.kt)("strong",{parentName:"li"},"Category Page"),", And for ",(0,r.kt)("strong",{parentName:"li"},"Sort by Relevance"),", only apply for Search page."),(0,r.kt)("li",{parentName:"ul"},"If ",(0,r.kt)("inlineCode",{parentName:"li"},"No"),", not apply this product type on Sorting but will apply the next enable product type as in *",(0,r.kt)("em",{parentName:"li"},"Default Sort By On Search Page")))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Label"),":",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter a name for product sorting by ",(0,r.kt)("strong",{parentName:"li"},"Position/Relevance")),(0,r.kt)("li",{parentName:"ul"},"This is a required field")))),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Default Sort Direction"),": Select the default sort direction with the selected sorting type:"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Ascending"),": arrange selected sorting products in the direction of increasing"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Descending"),": arrange selected sorting products in the direction of decreasing"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("strong",{parentName:"p"},"Sort Order"),":"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Enter the number for the Sort Order field. Smaller numbers will prioritize the default display on Sort by"),(0,r.kt)("li",{parentName:"ul"},"This is a required field. If left blank, a message is shown: ",(0,r.kt)("inlineCode",{parentName:"li"},"Please enter a valid number in this field"))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note"),": With ",(0,r.kt)("strong",{parentName:"p"},"Position"),", Sort By Position when accessing ",(0,r.kt)("inlineCode",{parentName:"p"},"Catalog > Categories"),", you can choose to apply any category for Sort By Position, then click on ",(0,r.kt)("strong",{parentName:"p"},"Products tab")," in Category to see their Positions."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"For example with ",(0,r.kt)("strong",{parentName:"li"},"Bags")," folder: ")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/nUk8Ttm.png",alt:null})),(0,r.kt)("h3",{id:"notation"},"Notation"),(0,r.kt)("p",null,"When you install the module, you should run the following command to update the newest product data:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento indexer:reindex")),(0,r.kt)("p",null,"When you want to uninstall the module, please go to database to delete it. Please access the ",(0,r.kt)("strong",{parentName:"p"},"Views")," table and ",(0,r.kt)("strong",{parentName:"p"},"Table")," column, find and delete the old data."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://cdn-docs.mageplaza.com/magento/better-sorting/Ydrs3T3.png",alt:null})),(0,r.kt)("h3",{id:"graphql"},"GraphQL"),(0,r.kt)("p",null,"Run the following command in Magento 2 root folder:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"composer require mageplaza/module-better-sorting")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento setup:upgrade")),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"php bin/magento setup:static-content:deploy")),(0,r.kt)("p",null,"Better Sorting extension by Mageplaza supports getting data in Configuration and searching products based on product attributes to help you find the desired items quickly."),(0,r.kt)("p",null,"To start working with Better Sorting GraphQL in Magento, you need to:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Use Magento 2.3.x or 2.4.x. Take the site back to the developer mode."),(0,r.kt)("li",{parentName:"ul"},"Learn more on request GraphQL we support ",(0,r.kt)("a",{parentName:"li",href:"https://documenter.getpostman.com/view/10589000/Uz5JHvJT"}
1,"here"))))}u.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.