AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: stefanmager on April 22, 2021, 11:51:53 PM

Title: Get rid of the 'Sort By:' panel/button
Post by: stefanmager 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

Title: Re: Get rid of the 'Sort By:' panel/button
Post by: abantecart 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.
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: stefanmager 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.
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: abantecart on April 26, 2021, 06:48:32 AM
An sorry for wrong URL. I have corrected it now.
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: stefanmager 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
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: maxter 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 :)
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: stefanmager 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
Title: Re: Get rid of the 'Sort By:' panel/button
Post by: stefanmager 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