Author Topic: Get rid of the 'Sort By:' panel/button  (Read 223 times)

Offline stefanmager

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Get rid of the 'Sort By:' panel/button
« on: April 22, 2021, 11:51:53 PM »
Hi, I wonder is there a way to remove the 'Sort By:' button/panel on the category pages? I don't need it and in my case such sorting doesn't make sense as there are only very few products. I have looked everywhere but cannot find an easy solution. Help would be much appreciated. Many thanks Stefan


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4308
  • Karma: +288/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Get rid of the 'Sort By:' panel/button
« Reply #1 on: April 26, 2021, 06:25:48 AM »
Here is the link to the file that shows the showing with the variable

https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/pages/product/category.tpl#L32

You can remove this line or better you can use hooks to hide it.
« Last Edit: April 26, 2021, 06:47:35 AM by abantecart »
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline stefanmager

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Get rid of the 'Sort By:' panel/button
« Reply #2 on: April 26, 2021, 06:38:52 AM »
Thanks. But the link returns a 'you do not have permission to access the moderation centre'. Not sure what that means. When you say 'hooks' what exactly does that mean? Like */ /* ?" Thanks for helping.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4308
  • Karma: +288/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Get rid of the 'Sort By:' panel/button
« Reply #3 on: April 26, 2021, 06:48:32 AM »
An sorry for wrong URL. I have corrected it now.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline stefanmager

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Get rid of the 'Sort By:' panel/button
« Reply #4 on: April 26, 2021, 06:59:16 AM »
Thanks. It works. Looking at the code I don't actually have a clue as how to use hooks. I'm a designer not a coder.  Would it be too much to ask for some sort of guidance as exactly what to do with this code line? If that's in some way out of line, my apologies. Cheers stefan

Offline maxter

  • Full Member
  • ***
  • Posts: 211
  • Karma: +64/-0
    • View Profile
Re: Get rid of the 'Sort By:' panel/button
« Reply #5 on: April 26, 2021, 08:26:53 AM »
When you say you are a designer. Do you know HTML? Just remove below HTML from the file suggested earlier:

Code: [Select]
<div class="sorting well">
  <form class=" form-inline pull-left">
    <?php echo $text_sort?>&nbsp;&nbsp;<?php echo $sorting?>
  </form>
  <div class="btn-group pull-right">
    <button class="btn" id="list"><i class="fa fa-th-list"></i>
    </button>
    <button class="btn btn-orange" id="grid"><i class="fa fa-th"></i></button>
  </div>
</div>

If you do not know PHP, you will not be able to hook :)

Offline stefanmager

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Get rid of the 'Sort By:' panel/button
« Reply #6 on: April 26, 2021, 08:36:41 AM »
Thanks a lot. Graphic designer... will try this tomorrow. Late night now here in Australia. Thanks again. Stefan

Offline stefanmager

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Get rid of the 'Sort By:' panel/button
« Reply #7 on: April 26, 2021, 11:09:30 PM »
Thanks. That worked like a charm. Now I wonder how I can get rid of the QTy box and the 'Total Price:$' items on the product page. I sell paintings and they are one-off so these items make no sense. I have looked and played with the product.tpl and I can see code for these items. I have removed them from the code but they reappear on the screen. I basically cannot work out from where these items are being called. If at all possible, maybe you could tell me? Whichever way, thanks again and regards. Stefan

 

Powered by SMFPacks Social Login Mod