Jump to content

(Solved) How to hide "sort by" function?


Recommended Posts

One way to do it is to comment out some code in the product-sort.tpl file for the particular theme. Assuming you use the default prestashop theme, you can find the file in the root PrestaShop directory on your hosting account in themes/prestashop/product-sort.tpl.

 

Comment out the code that starts with:

 

<form id="productsSortForm" action="{$request|escape:'htmlall':'UTF-8'}">
<p class="select">
 <select id="selectPrductSort">

 

And ends with:

 

<label for="selectPrductSort">{l s='Sort by'}</label>
</p>
</form>

 

To comment it out just put an exclamation mark and two hyphens after the first bracket for that piece of code (e.g. <!--form id...), and two hyphens before the last bracket (e.g. </form--> ).

 

To see the change on the frontend, log in to the backend of your PrestaShop application, go to the Preferences tab and then to the Performance sub-tab, and set the Force Compile option to Yes. After you edit the product-sort.tpl file, refresh the frontend, and when you make sure the change appears there disable the Force Compile option.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...