Post by kmeriage » Tue Jun 13, 2023 12:54 am

OpenCart gurus,

Can you please tell me how to remove:
Product Compare, Sort by dropdown, and Show dropdown
from this, and like pages:
https://blueavocadodesign.com/a1/index. ... ry&path=69


As shown, there will typically be one or a few products on a category page.
In our case, categories are customers and not to be compared.

OpenCart 3.0.3.8
Default Template

Thank you!

Newbie

Posts

Joined
Wed Jun 07, 2023 12:37 pm

Post by OpenCode3.0 » Tue Jun 13, 2023 5:18 am

you can do the following on your catalog/view/theme/default/stylesheet/stylesheet.css
then add the following

Code: Select all

.sort, #input-sort,.limit, #input-limit, #compare-total {
display: none;
}
 
save it go to extensions -> modification -> click on the refresh button and go to your front store and check.

if that doesn't work because I think opencart removed the classes "sort" and "limit"

then you need to do this on catalog/view/theme/default/template/product/category.twig
find the first

Code: Select all

 {% if products %}
after that, you will see

Code: Select all

 <div class="row">
and you need to replace it with the following ( or just add the hide after the row)

Code: Select all

 <div class="row hide">

Newbie

Posts

Joined
Sun Apr 17, 2022 1:51 am

Post by paulfeakins » Tue Jun 13, 2023 7:57 pm

kmeriage wrote:
Tue Jun 13, 2023 12:54 am
Can you please tell me how to remove:
Product Compare, Sort by dropdown, and Show dropdown
I'm sure this has been asked and answered before - did you search the forum before asking?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JNeuhoff » Tue Jun 13, 2023 8:20 pm

In our case, categories are customers and not to be compared.
This doesn't make sense to me.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by by mona » Tue Jun 13, 2023 9:52 pm

In the same vein as Opencart3.0
Stylesheet.css
remember to refresh

This might be a better solution

Code: Select all

#product-category #input-sort, #product-category label[for="input-sort"], #product-category label[for="input-limit"], #product-category #input-limit, #product-category #compare-total {
display: none;
}
#product-category #list-view {
margin-bottom:45px;
}

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Wed Jun 14, 2023 7:12 pm

JNeuhoff wrote:
Tue Jun 13, 2023 8:20 pm
In our case, categories are customers and not to be compared.
This doesn't make sense to me.
Perhaps they give each customer their own category? Who knows!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 31 guests