{"id":355021,"date":"2022-10-17T06:11:50","date_gmt":"2022-10-17T06:11:50","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=355021"},"modified":"2022-10-17T12:56:11","modified_gmt":"2022-10-17T12:56:11","slug":"how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/","title":{"rendered":"How to customize default sorting option on product listing in PrestaShop 1.7"},"content":{"rendered":"\n<p>In this blog, We are going to learn how we can customize existing sorting options in PrestaShop 1.7. First of all, we need to understand the concept of sorting.<\/p>\n\n\n\n<p><strong>&#8220;Sorting is an algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.&#8221;<\/strong><\/p>\n\n\n\n<p>As we know PrestaShop provides some default sorting options with the installation. These sorting options manage by the PrestaShop default module named &#8220;ps_facetedsearch&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1042\" height=\"612\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\" alt=\"Sorting-Options\" class=\"wp-image-355023\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png 1042w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options-300x176.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options-250x147.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options-768x451.png 768w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" loading=\"lazy\" \/><figcaption>Default Sorting Options<\/figcaption><\/figure>\n\n\n\n<p>You can add a custom sorting option in two ways.<\/p>\n\n\n\n<p><strong>1) <\/strong>Directly by changing the code in <strong>ps_facetedsearch<\/strong> module. Here is file path below.<\/p>\n\n\n\n<p><strong>Path: <\/strong>modules\/ps_facetedsearch\/src\/Product\/SearchProvider.php<\/p>\n\n\n\n<p><strong>2)<\/strong> We can manage things separately by creating a small module. We have created a demo module for this practical.<\/p>\n\n\n\n<p>Now we need to override the ps_facetedsearch module class &amp; main file.<\/p>\n\n\n\n<p><strong>Base_Path: modules\/demomodule<\/strong><\/p>\n\n\n\n<p>Firstly, We need to override the module main class on Base_Path\/override\/modules\/ps_facetedsearch\/ps_facetedsearch.php<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php \nrequire_once (__DIR__.&#039;\/src\/Product\/SearchProvider.php&#039;); \nuse PrestaShop\\Module\\FacetedSearch\\URLSerializer; \nuse PrestaShop\\Module\\FacetedSearch\\Filters\\Converter; \n    \nclass Ps_FacetedsearchOverride extends Ps_Facetedsearch \n{ \n    public function hookProductSearchProvider($params) \n    { \n        $query = $params&#091;&#039;query&#039;]; \n        if ($query-&gt;getIdCategory()) { \n            $urlSerializer = new URLSerializer(); \n            return new SearchProviderOverride( \n                $this, \n                new Converter( \n                    $this-&gt;getContext(), \n                    $this-&gt;getDatabase(), \n                    $urlSerializer \n                ), \n                $urlSerializer \n            ); \n        } else { \n            return null; \n        } \n    } \n}<\/pre>\n\n\n\n<p>Now we need to modify available sorting options by overriding the existing SearchProvider.php class. Check below.<\/p>\n\n\n\n<p><strong>Path:<\/strong> Base_Path\/override\/modules\/ps_facetedsearch\/src\/Product\/SearchProvider.php <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php \nuse PrestaShop\\Module\\FacetedSearch\\Filters; \nuse PrestaShop\\Module\\FacetedSearch\\URLSerializer; \nuse PrestaShop\\PrestaShop\\Core\\Product\\Search\\ProductSearchContext; \nuse PrestaShop\\PrestaShop\\Core\\Product\\Search\\ProductSearchQuery; \nuse PrestaShop\\PrestaShop\\Core\\Product\\Search\\SortOrder; \nuse PrestaShop\\Module\\FacetedSearch\\Product\\SearchProvider; \nclass SearchProviderOverride extends SearchProvider \n{ \n    private $_module; \n    public function __construct( \n        Ps_Facetedsearch $module, \n        Filters\\Converter $converter, \n        URLSerializer $serializer, \n        SearchFactory $searchFactory = null \n    ) { \n        parent::__construct($module, $converter, $serializer, $searchFactory); \n        $this-&gt;_module = $module; \n    }    \n    public function runQuery( \n        ProductSearchContext $context, \n        ProductSearchQuery $query \n    ) { \n        $result = parent::runQuery($context, $query); \n        $result-&gt;setAvailableSortOrders($this-&gt;getCustomSorting()); \n        return $result; \n    } \n\n    private function getCustomSorting() \n    { \n        \/\/ Existing Sorting Options\n        $sortSalesDesc = new SortOrder(&#039;product&#039;, &#039;sales&#039;, &#039;desc&#039;);\n        $sortPosAsc = new SortOrder(&#039;product&#039;, &#039;position&#039;, &#039;asc&#039;);\n        $sortNameAsc = new SortOrder(&#039;product&#039;, &#039;name&#039;, &#039;asc&#039;);\n        $sortNameDesc = new SortOrder(&#039;product&#039;, &#039;name&#039;, &#039;desc&#039;);\n        $sortPriceAsc = new SortOrder(&#039;product&#039;, &#039;price&#039;, &#039;asc&#039;);\n        $sortPriceDesc = new SortOrder(&#039;product&#039;, &#039;price&#039;, &#039;desc&#039;);\n        \n        \/\/ Custom option added\n        $sortDateDesc = new SortOrder(&#039;product&#039;, &#039;date_add&#039;, &#039;desc&#039;); \n        $translator = $this-&gt;_module-&gt;getTranslator(); \n        return &#091; \n            $sortSalesDesc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Best sellers&#039;, &#091;], &#039;Modules.Facetedsearch.Shop&#039;)\n            ),\n            $sortPosAsc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Relevance&#039;, &#091;], &#039;Modules.Facetedsearch.Shop&#039;)\n            ),\n            $sortNameAsc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Name, A to Z&#039;, &#091;], &#039;Shop.Theme.Catalog&#039;)\n            ),\n            $sortNameDesc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Name, Z to A&#039;, &#091;], &#039;Shop.Theme.Catalog&#039;)\n            ),\n            $sortPriceAsc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Price, low to high&#039;, &#091;], &#039;Shop.Theme.Catalog&#039;)\n            ),\n            $sortPriceDesc-&gt;setLabel(\n                $translator-&gt;trans(&#039;Price, high to low&#039;, &#091;], &#039;Shop.Theme.Catalog&#039;)\n            ),\n            $sortDateDesc-&gt;setLabel( \n                $translator-&gt;trans(&#039;Product, Date add desc&#039;, &#091;], &#039;Modules.Facetedsearch.Shop&#039;) \n            ), \n        ]; \n    } \n}<\/pre>\n\n\n\n<p>After these changes, you can see we have added a new sorting option in the sorting list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"935\" height=\"612\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Option-Added.png\" alt=\"Option-Added\" class=\"wp-image-355025\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Option-Added.png 935w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Option-Added-300x196.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Option-Added-250x164.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Option-Added-768x503.png 768w\" sizes=\"(max-width: 935px) 100vw, 935px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Note:<\/strong> If you want to remove any existing sorting option then you just need to remove SortOrder &amp; setLabel from the list.<\/p>\n\n\n\n<p>That\u2019s all about this blog. Hope it will help you.<\/p>\n\n\n\n<p>If you are facing any issues or have any doubts about the above process, please feel free to contact us through the comment section.<\/p>\n\n\n\n<p>Also, you can explore our <a href=\"https:\/\/webkul.com\/prestashop-development\/\">PrestaShop Development Services<\/a> and a large range of quality <a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">PrestaShop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt contact us at support@webkul.com <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, We are going to learn how we can customize existing sorting options in PrestaShop 1.7. First of all, we need to understand the concept of sorting. &#8220;Sorting is an algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the <a href=\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":387,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209],"tags":[8785,5807,4148,4146],"class_list":["post-355021","post","type-post","status-publish","format-standard","hentry","category-prestashop","tag-add-sorting-fields","tag-alphabetical-sorting-of-vendors","tag-product-sorting","tag-sorting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog<\/title>\n<meta name=\"description\" content=\"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.&quot;Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.&quot;As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named &quot;ps_facetedsearch&quot;.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.&quot;Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.&quot;As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named &quot;ps_facetedsearch&quot;.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-17T06:11:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-17T12:56:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\" \/>\n<meta name=\"author\" content=\"Sunny Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sunny Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\"},\"author\":{\"name\":\"Sunny Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67\"},\"headline\":\"How to customize default sorting option on product listing in PrestaShop 1.7\",\"datePublished\":\"2022-10-17T06:11:50+00:00\",\"dateModified\":\"2022-10-17T12:56:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\"},\"wordCount\":312,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\",\"keywords\":[\"Add Sorting Fields\",\"Alphabetical sorting of vendors\",\"product Sorting\",\"sorting\"],\"articleSection\":[\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\",\"name\":\"How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\",\"datePublished\":\"2022-10-17T06:11:50+00:00\",\"dateModified\":\"2022-10-17T12:56:11+00:00\",\"description\":\"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.\\\"Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.\\\"As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named \\\"ps_facetedsearch\\\".\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png\",\"width\":1042,\"height\":612,\"caption\":\"Sorting-Options\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to customize default sorting option on product listing in PrestaShop 1.7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67\",\"name\":\"Sunny Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sunny Kumar\"},\"description\":\"Sunny, a Prestashop virtuoso, crafts innovative eCommerce solutions. His expertise in marketplace development is unparalleled, seamlessly integrating modules. With precision coding, Sunny creates robust online stores, ensuring a seamless user experience. His engineering prowess enhances digital retail, leaving a lasting impact on the Prestashop community.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/sunny-kumar912\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog","description":"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.\"Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.\"As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named \"ps_facetedsearch\".","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/","og_locale":"en_US","og_type":"article","og_title":"How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog","og_description":"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.\"Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.\"As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named \"ps_facetedsearch\".","og_url":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-10-17T06:11:50+00:00","article_modified_time":"2022-10-17T12:56:11+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png","type":"","width":"","height":""}],"author":"Sunny Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sunny Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/"},"author":{"name":"Sunny Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67"},"headline":"How to customize default sorting option on product listing in PrestaShop 1.7","datePublished":"2022-10-17T06:11:50+00:00","dateModified":"2022-10-17T12:56:11+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/"},"wordCount":312,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png","keywords":["Add Sorting Fields","Alphabetical sorting of vendors","product Sorting","sorting"],"articleSection":["prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/","url":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/","name":"How to customize default sorting option on product listing in PrestaShop 1.7 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png","datePublished":"2022-10-17T06:11:50+00:00","dateModified":"2022-10-17T12:56:11+00:00","description":"In this blog, We are going to learn that how we can customized existing sorting options in PrestaShop 1.7. First of all we need to understand the concept of sorting.\"Sorting is a algorithm which specifies the way to arrange data in a particular order OR you can say sorting is the process of arranging the data in ascending and descending order.\"As we know PrestaShop provides some default sorting option with the installation. These sorting options manages by PrestaShop default module named \"ps_facetedsearch\".","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Sorting-Options.png","width":1042,"height":612,"caption":"Sorting-Options"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-customize-default-sorting-option-on-product-listing-in-prestashop-1-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to customize default sorting option on product listing in PrestaShop 1.7"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/82afaa5265683f080b52d639e7cdaf67","name":"Sunny Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/71f74f424b1b289dfe7a885325f69bf2ecd11c159d2c3ee19fc5df341650df4c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sunny Kumar"},"description":"Sunny, a Prestashop virtuoso, crafts innovative eCommerce solutions. His expertise in marketplace development is unparalleled, seamlessly integrating modules. With precision coding, Sunny creates robust online stores, ensuring a seamless user experience. His engineering prowess enhances digital retail, leaving a lasting impact on the Prestashop community.","url":"https:\/\/webkul.com\/blog\/author\/sunny-kumar912\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/355021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=355021"}],"version-history":[{"count":6,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/355021\/revisions"}],"predecessor-version":[{"id":355041,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/355021\/revisions\/355041"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=355021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=355021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=355021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}